Skip to content

Commit 2d445d5

Browse files
author
florianlink
committed
reuse wrapper if it inherits, not only if it is the same class
git-svn-id: http://svn.code.sf.net/p/pythonqt/code/trunk@395 ea8d5007-eb21-0410-b261-ccb3ea6e24a9
1 parent b60922b commit 2d445d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PythonQt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ PyObject* PythonQtPrivate::wrapPtr(void* ptr, const QByteArray& name, bool passO
596596
info->setMetaObject(wrapper->metaObject());
597597
}
598598

599-
if (possibleStillAliveWrapper && possibleStillAliveWrapper->classInfo() == info) {
599+
if (possibleStillAliveWrapper && possibleStillAliveWrapper->classInfo()->inherits(info)) {
600600
wrap = possibleStillAliveWrapper;
601601
Py_INCREF(wrap);
602602
} else {

0 commit comments

Comments
 (0)