diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-04-27 17:51:52 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:15 -0300 |
commit | 3bb2bf375e52006c4880aff88f20344f5ccf1f87 (patch) | |
tree | b22932164ad801c95890af8d59d13ff8ff595c7d /libpyside | |
parent | c4225d063d7e78c6a761004745ccda4cf5188860 (diff) |
Fix bug 836 - "Pyside crashes with more than four base classes"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'libpyside')
-rw-r--r-- | libpyside/pyside.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libpyside/pyside.cpp b/libpyside/pyside.cpp index a135692bf..4b1c17b6a 100644 --- a/libpyside/pyside.cpp +++ b/libpyside/pyside.cpp @@ -154,7 +154,7 @@ void initQObjectSubType(SbkObjectType* type, PyObject* args, PyObject* kwds) QByteArray className(PyString_AS_STRING(PyTuple_GET_ITEM(args, 0))); PyObject* bases = PyTuple_GET_ITEM(args, 1); - int numBases = PyTuple_GET_SIZE(args); + int numBases = PyTuple_GET_SIZE(bases); QMetaObject* baseMo = 0; for (int i = 0; i < numBases; ++i) { @@ -230,7 +230,7 @@ void initQObjectSubType(SbkObjectType* type, PyObject* args, PyObject* kwds) PyObject* getMetaDataFromQObject(QObject* cppSelf, PyObject* self, PyObject* name) { PyObject* attr = PyObject_GenericGetAttr(self, name); - if (!Shiboken::Object::isValid(reinterpret_cast<SbkObject*>(self), false)) + if (!Shiboken::Object::isValid(reinterpret_cast<SbkObject*>(self), false)) return attr; if (attr && Property::isPropertyType(attr)) { |