diff options
author | Renato Filho <renato.filho@openbossa.org> | 2011-10-05 19:33:12 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:18:20 -0300 |
commit | f10f587d43a27500540bee7ae4251a78a4a444a2 (patch) | |
tree | 9e977739780dc0a0aa7454d73a3e03bfc0716856 | |
parent | fea5022ce62c637b03b5f8d9c2d91ca8d706358b (diff) |
Fixed object destruction.
-rw-r--r-- | libshiboken/basewrapper.cpp | 3 |
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 { |