aboutsummaryrefslogtreecommitdiffstats
path: root/libpyside
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-04-04 18:06:07 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:06 -0300
commit1067faec16032e2f71c72b8415605708a88adb66 (patch)
tree3c9515c5ba8ce4bfdc852b6372aa558daa777bf0 /libpyside
parent2e1ed4a88122b10bffa35043ff1373e8ec476dcd (diff)
Change the order of function call on destructionVisitor to avoid problems with cyclic dependency.
Fixes bug #793. Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Hugo Parente <hugo.lima@openbossa.org>
Diffstat (limited to 'libpyside')
-rw-r--r--libpyside/pyside.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libpyside/pyside.cpp b/libpyside/pyside.cpp
index ec710a517..a135692bf 100644
--- a/libpyside/pyside.cpp
+++ b/libpyside/pyside.cpp
@@ -113,10 +113,11 @@ static void destructionVisitor(SbkObject* pyObj, void* data)
if (pyObj != pyQApp && PyObject_TypeCheck(pyObj, pyQObjectType)) {
if (Shiboken::Object::hasOwnership(pyObj) && Shiboken::Object::isValid(pyObj, false)) {
+ Shiboken::Object::setValidCpp(pyObj, false);
+
Py_BEGIN_ALLOW_THREADS
Shiboken::callCppDestructor<QObject>(Shiboken::Object::cppPointer(pyObj, pyQObjectType));
Py_END_ALLOW_THREADS
- Shiboken::Object::setValidCpp(pyObj, false);
}
}
};