diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-12-06 15:08:56 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-12-06 15:08:56 -0600 |
commit | 997490223743e3bd40c3cedf5dc799243c6dad9e (patch) | |
tree | 4e7e779b3e8e255bd0086301d0a22b9a9aef805a /src | |
parent | f6b53fc5257e48406685bf6698b834d723be8ce7 (diff) | |
download | qt3-997490223743e3bd40c3cedf5dc799243c6dad9e.tar.gz qt3-997490223743e3bd40c3cedf5dc799243c6dad9e.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.h | 8 |
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 |