From 997490223743e3bd40c3cedf5dc799243c6dad9e Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 6 Dec 2014 15:08:56 -0600 Subject: [PATCH] Try to avoid crashes if the destructor of a TQMap is called when no private object was previously created --- src/tools/qmap.h | 8 ++++++-- 1 file 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& operator= ( const QMap& m ); #ifndef QT_NO_STL