From fb2e671067ff28cc6513c5eac7ca426c34bb245c 2010-03-09 19:38:00 From: florianlink Date: 2010-03-09 19:38:00 Subject: [PATCH] fixed deriving C++ classes git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@159 ea8d5007-eb21-0410-b261-ccb3ea6e24a9 --- diff --git a/src/PythonQtClassWrapper.cpp b/src/PythonQtClassWrapper.cpp index 118ac12..b53ddf5 100644 --- a/src/PythonQtClassWrapper.cpp +++ b/src/PythonQtClassWrapper.cpp @@ -217,7 +217,9 @@ static PyObject* PythonQtClassWrapper_alloc(PyTypeObject *self, Py_ssize_t nitem // take current class type, if we are called via newPythonQtClassWrapper() PythonQtClassWrapper* wrap = (PythonQtClassWrapper*)obj; wrap->_classInfo = PythonQt::priv()->currentClassInfoForClassWrapperCreation(); - initializeSlots(wrap); + if (wrap->_classInfo) { + initializeSlots(wrap); + } return obj; }