Skip to content

Commit 22cf951

Browse files
jcfrjamesobutler
authored andcommitted
addDecorators: Check for null object
1 parent d7163f6 commit 22cf951

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

15691569
void PythonQtPrivate::addDecorators(QObject* o, int decoTypes)
15701570
{
1571+
if (!o)
1572+
{
1573+
return;
1574+
}
15711575
o->setParent(this);
15721576
int numMethods = o->metaObject()->methodCount();
15731577
for (int i = 0; i < numMethods; i++) {

0 commit comments

Comments
 (0)