diff options
Diffstat (limited to 'src/kernel/qobject.cpp')
-rw-r--r-- | src/kernel/qobject.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/kernel/qobject.cpp b/src/kernel/qobject.cpp index 3d9ef0b1c..16c9b23e9 100644 --- a/src/kernel/qobject.cpp +++ b/src/kernel/qobject.cpp @@ -610,11 +610,13 @@ TQObject::~TQObject() blockSig = 0; // unblock signals to keep TQGuardedPtr happy emit destroyed( this ); emit destroyed(); - if ( objname ) + if ( objname ) { delete [] (char*)objname; + } objname = 0; - if ( pendTimer ) // might be pending timers + if ( pendTimer ) { // might be pending timers qKillTimer( this ); + } TQApplication::removePostedEvents( this ); if ( isTree ) { remove_tree( this ); // remove from global root list @@ -924,12 +926,17 @@ void destroyDeepCopiedTQUObjectArray(TQUObject* uArray) bool TQObject::event( TQEvent *e ) { #if defined(QT_CHECK_NULL) - if ( e == 0 ) + if ( e == 0 ) { tqWarning( "TQObject::event: Null events are not permitted" ); + } #endif + if ( wasDeleted ) { + return TRUE; + } if ( eventFilters ) { // try filters - if ( activate_filters(e) ) // stopped by a filter + if ( activate_filters(e) ) { // stopped by a filter return TRUE; + } } switch ( e->type() ) { |