Skip to content

Commit 0ed92f7

Browse files
committed
addDecorators: Check for null object
1 parent 2115a39 commit 0ed92f7

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

14781478
void PythonQtPrivate::addDecorators(QObject* o, int decoTypes)
14791479
{
1480+
if (!o)
1481+
{
1482+
return;
1483+
}
14801484
o->setParent(this);
14811485
int numMethods = o->metaObject()->methodCount();
14821486
for (int i = 0; i < numMethods; i++) {

0 commit comments

Comments
 (0)