Skip to content

Commit 7b23039

Browse files
committed
addDecorators: Check for null object
1 parent bdb6d86 commit 7b23039

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
@@ -1378,6 +1378,10 @@ PythonQtClassInfo* PythonQtPrivate::currentClassInfoForClassWrapperCreation()
13781378

13791379
void PythonQtPrivate::addDecorators(QObject* o, int decoTypes)
13801380
{
1381+
if (!o)
1382+
{
1383+
return;
1384+
}
13811385
o->setParent(this);
13821386
int numMethods = o->metaObject()->methodCount();
13831387
for (int i = 0; i < numMethods; i++) {

0 commit comments

Comments
 (0)