diff options
-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 |