diff options
-rw-r--r-- | sources/pyside6/libpyside/globalreceiverv2.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sources/pyside6/libpyside/globalreceiverv2.cpp b/sources/pyside6/libpyside/globalreceiverv2.cpp index c935d1180..0fe67db37 100644 --- a/sources/pyside6/libpyside/globalreceiverv2.cpp +++ b/sources/pyside6/libpyside/globalreceiverv2.cpp @@ -299,8 +299,10 @@ void GlobalReceiverV2::notify() const QSet<const QObject *> objSet(m_refs.cbegin(), m_refs.cend()); Py_BEGIN_ALLOW_THREADS for (const QObject *o : objSet) { - QMetaObject::disconnect(o, DESTROY_SIGNAL_ID, this, DESTROY_SLOT_ID); - QMetaObject::connect(o, DESTROY_SIGNAL_ID, this, DESTROY_SLOT_ID); + if (o) { + QMetaObject::disconnect(o, DESTROY_SIGNAL_ID, this, DESTROY_SLOT_ID); + QMetaObject::connect(o, DESTROY_SIGNAL_ID, this, DESTROY_SLOT_ID); + } } Py_END_ALLOW_THREADS } |