diff --git a/src/PythonQt.cpp b/src/PythonQt.cpp index 4d01a15bb..9d6cf20aa 100644 --- a/src/PythonQt.cpp +++ b/src/PythonQt.cpp @@ -1560,6 +1560,10 @@ PythonQtClassInfo* PythonQtPrivate::currentClassInfoForClassWrapperCreation() void PythonQtPrivate::addDecorators(QObject* o, int decoTypes) { + if (o == nullptr) + { + return; + } o->setParent(this); int numMethods = o->metaObject()->methodCount(); for (int i = 0; i < numMethods; i++) {