Try to avoid crashes if the destructor of a TQMap is called when no private object was previously created

(cherry picked from commit 9974902237)
v3.5.13-sru
Timothy Pearson 11 years ago committed by Slávek Banko
parent 92cad529ea
commit f7fcc6acb7

@ -644,8 +644,12 @@ public:
#endif #endif
~QMap() ~QMap()
{ {
if ( sh->deref() ) if ( sh ) {
delete sh; if ( sh->deref() ) {
delete sh;
sh = 0L;
}
}
} }
QMap<Key,T>& operator= ( const QMap<Key,T>& m ); QMap<Key,T>& operator= ( const QMap<Key,T>& m );
#ifndef QT_NO_STL #ifndef QT_NO_STL

Loading…
Cancel
Save