Skip to content

Commit 8e2509c

Browse files
committed
addDecorators: Check for null object
1 parent a4d2be5 commit 8e2509c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/PythonQt.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,6 +1339,10 @@ PythonQtClassInfo* PythonQtPrivate::currentClassInfoForClassWrapperCreation()
13391339

13401340
void PythonQtPrivate::addDecorators(QObject* o, int decoTypes)
13411341
{
1342+
if (!o)
1343+
{
1344+
return;
1345+
}
13421346
o->setParent(this);
13431347
int numMethods = o->metaObject()->methodCount();
13441348
for (int i = 0; i < numMethods; i++) {

0 commit comments

Comments
 (0)