File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -283,10 +283,15 @@ class ASignal final : public AAbstractSignal {
283283 if (!value) {
284284 return ;
285285 }
286- std::unique_lock lock (AObjectBase::SIGNAL_SLOT_GLOBAL_SYNC);
287- // this destructor can be called in ASignal destructor, so it's worth to reset the sender as well.
288- value->sender = nullptr ;
289- value->unlinkInReceiverSideOnly (lock);
286+ {
287+ std::unique_lock lock (AObjectBase::SIGNAL_SLOT_GLOBAL_SYNC);
288+ // this destructor can be called in ASignal destructor, so it's worth to reset the sender as well.
289+ value->sender = nullptr ;
290+ value->unlinkInReceiverSideOnly (lock);
291+ }
292+ // releasing lock before value = nullptr.
293+ // destroying `value` object could trigger a cascade of destructions, leading to a re-entrant lock
294+ // attempt on a non-recursive mutex.
290295 value = nullptr ;
291296 }
292297 };
You can’t perform that action at this time.
0 commit comments