From 74f7b9309e194faee2de1ce354bf5c717b01f5c9 Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Wed, 13 Mar 2024 23:01:57 +0300 Subject: [PATCH] Add a lock to removing ourself from another's object's sender list Signed-off-by: Alexander Golubev --- src/kernel/qobject.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/kernel/qobject.cpp b/src/kernel/qobject.cpp index b8f1a6ee..1e6d5583 100644 --- a/src/kernel/qobject.cpp +++ b/src/kernel/qobject.cpp @@ -777,6 +777,9 @@ TQObject::~TQObject() while( (c=cit.current()) ) { // for each connected slot... ++cit; if ( (obj=c->object()) ) { +#ifdef TQT_THREAD_SUPPORT + TQMutexLocker locker( obj->senderObjects->listMutex ); +#endif removeObjFromList( obj->senderObjects, this ); } }