aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/libpyside/globalreceiverv2.cpp
diff options
context:
space:
mode:
authorSimo Fält <simo.falt@qt.io>2023-05-25 11:25:57 +0300
committerSimo Fält <simo.falt@qt.io>2023-05-25 11:25:57 +0300
commit2342e61cb53824e2dcd6324e3d108500d61ffee2 (patch)
tree2899ebce2effcb9e3bd5622fbdb371f75feadd59 /sources/pyside2/libpyside/globalreceiverv2.cpp
parente31990ada911989dbcef3d4833f77dd054030e2c (diff)
parentb9cf35960e98adf9af7c4ea2cc09bfbdadf4f71f (diff)
Merge tag 'v5.15.8-lts' into tqtc/lts-5.15-opensourcev5.15.8-lts-lgpl
Qt For Python Release 5.15.8 Change-Id: Ib92716482ef78eead1859f4f0c980b308a6e5846
Diffstat (limited to 'sources/pyside2/libpyside/globalreceiverv2.cpp')
-rw-r--r--sources/pyside2/libpyside/globalreceiverv2.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/sources/pyside2/libpyside/globalreceiverv2.cpp b/sources/pyside2/libpyside/globalreceiverv2.cpp
index b16a923dd..88bba9338 100644
--- a/sources/pyside2/libpyside/globalreceiverv2.cpp
+++ b/sources/pyside2/libpyside/globalreceiverv2.cpp
@@ -291,8 +291,10 @@ void GlobalReceiverV2::notify()
#endif
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
}