aboutsummaryrefslogtreecommitdiffstats
path: root/libshiboken
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-10-05 19:33:12 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:18:20 -0300
commitf10f587d43a27500540bee7ae4251a78a4a444a2 (patch)
tree9e977739780dc0a0aa7454d73a3e03bfc0716856 /libshiboken
parentfea5022ce62c637b03b5f8d9c2d91ca8d706358b (diff)
Fixed object destruction.
Diffstat (limited to 'libshiboken')
-rw-r--r--libshiboken/basewrapper.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp
index 6795cbb3d..97154ee7d 100644
--- a/libshiboken/basewrapper.cpp
+++ b/libshiboken/basewrapper.cpp
@@ -217,7 +217,8 @@ void SbkDeallocWrapper(PyObject* pyObj)
Shiboken::Object::deallocData(sbkObj, true);
Shiboken::ThreadStateSaver threadSaver;
- threadSaver.save();
+ if (Py_IsInitialized())
+ threadSaver.save();
sbkType->d->cpp_dtor(cptr);
}
} else {