summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-12-06 21:08:56 (GMT)
committer Timothy Pearson <kb9vqf@pearsoncomputing.net>2014-12-06 21:08:56 (GMT)
commit997490223743e3bd40c3cedf5dc799243c6dad9e (patch)
tree4e7e779b3e8e255bd0086301d0a22b9a9aef805a
parentf6b53fc5257e48406685bf6698b834d723be8ce7 (diff)
downloadqt3-99749022.zip
qt3-99749022.tar.gz
Try to avoid crashes if the destructor of a TQMap is called when no private object was previously createdr14.0.0
-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