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

pull/2/head r14.0.0
Timothy Pearson 10 years ago
parent f6b53fc525
commit 9974902237

@ -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