Don't decref if the interpreter is not initialized, (eg. it's in its

shutdown process.)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-10-28 02:59:02 +00:00
parent 55811cde2d
commit 9f4a1fed45

View File

@@ -1724,7 +1724,7 @@ PyObject* wxPyCBH_callCallbackObj(const wxPyCallbackHelper& cbh, PyObject* argTu
void wxPyCBH_delete(wxPyCallbackHelper* cbh) {
if (cbh->m_incRef) {
if (cbh->m_incRef && Py_IsInitialized()) {
wxPyBlock_t blocked = wxPyBeginBlockThreads();
Py_XDECREF(cbh->m_self);
Py_XDECREF(cbh->m_class);