summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-12-06 15:08:56 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-12-06 15:08:56 -0600
commit997490223743e3bd40c3cedf5dc799243c6dad9e (patch)
tree4e7e779b3e8e255bd0086301d0a22b9a9aef805a /src
parentf6b53fc5257e48406685bf6698b834d723be8ce7 (diff)
downloadqt3-99749022.tar.gz
qt3-99749022.zip
Try to avoid crashes if the destructor of a TQMap is called when no private object was previously createdr14.0.0
Diffstat (limited to 'src')
-rw-r--r--src/tools/qmap.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tools/qmap.h b/src/tools/qmap.h
index 4f9772f..a785832 100644
--- a/src/tools/qmap.h
+++ b/src/tools/qmap.h
@@ -644,8 +644,12 @@ public:
#endif
~QMap()
{
- if ( sh->deref() )
- delete sh;
+ if ( sh ) {
+ if ( sh->deref() ) {
+ delete sh;
+ sh = 0L;
+ }
+ }
}
QMap<Key,T>& operator= ( const QMap<Key,T>& m );
#ifndef QT_NO_STL