aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Touraille <touraill@adobe.com>2022-04-07 11:38:15 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-04-09 11:49:30 +0000
commitc16d69335dfe5621b68260d44ab6ce4b3eb2abf9 (patch)
tree8d358aa93c73accbf34dc1c18981da7c5a115044
parent0abb0b90be362ef006e1c2a77347f9822ea01fc1 (diff)
Fix uninitialized variable causing crash when using shiboken.delete
The isQAppSingleton flag was not initialized, meaning that any shiboken wrapper could be randomly considered as a QCoreApp one. Change-Id: I96c836762a2ad2a6e8978dee10965c086bd50645 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit fca1416b4f4aedc640f05a8183e04b67ea117495) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--sources/shiboken6/libshiboken/basewrapper.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/sources/shiboken6/libshiboken/basewrapper.cpp b/sources/shiboken6/libshiboken/basewrapper.cpp
index 352ee70d3..1d7c18b14 100644
--- a/sources/shiboken6/libshiboken/basewrapper.cpp
+++ b/sources/shiboken6/libshiboken/basewrapper.cpp
@@ -570,6 +570,7 @@ static PyObject *_setupNew(SbkObject *self, PyTypeObject *subtype)
d->parentInfo = nullptr;
d->referredObjects = nullptr;
d->cppObjectCreated = 0;
+ d->isQAppSingleton = 0;
self->ob_dict = nullptr;
self->weakreflist = nullptr;
self->d = d;