diff options
author | Renato Filho <renato.filho@openbossa.org> | 2011-03-15 15:33:30 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:03 -0300 |
commit | 855ad2d587161e8ae3ea7b0c64d30f73130e3cd8 (patch) | |
tree | 463fcb2b4cbfa15d24793e1a06214f532c6bec7a /libpyside/pyside.cpp | |
parent | d3fb0b38b76eb9a08a60c1a5667388afe9521fea (diff) |
Check if class is valid before call meta object function on class getattro function.
Fix bug #696.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'libpyside/pyside.cpp')
-rw-r--r-- | libpyside/pyside.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libpyside/pyside.cpp b/libpyside/pyside.cpp index ae3ce3f2e..7fe39ead7 100644 --- a/libpyside/pyside.cpp +++ b/libpyside/pyside.cpp @@ -228,6 +228,9 @@ void initQObjectSubType(SbkObjectType* type, PyObject* args, PyObject* kwds) PyObject* getMetaDataFromQObject(QObject* cppSelf, PyObject* self, PyObject* name) { + if (!Shiboken::Object::isValid(self)) + return 0; + PyObject* attr = PyObject_GenericGetAttr(self, name); if (attr && Property::isPropertyType(attr)) { PyObject *value = Property::getValue(reinterpret_cast<PySideProperty*>(attr), self); |