summaryrefslogtreecommitdiffstats
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>2011-10-06 17:04:20 -0300
commit20461c9aff5e89cba3be0198052f016c4899191e (patch)
treeadf0bda2e922bccc132ac9961eaf71a562a55ab7 /libshiboken
parent7a15e5cf60f17aa7123703b79a51d6b93b1227f5 (diff)
downloadshiboken-20461c9aff5e89cba3be0198052f016c4899191e.tar.gz
shiboken-20461c9aff5e89cba3be0198052f016c4899191e.tar.xz
shiboken-20461c9aff5e89cba3be0198052f016c4899191e.zip
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 9ac1ab37..26a8cc76 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 {