From 913f5facbfd7e154c93822ffe054ab92c2e7e0a1 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 13 Oct 2000 23:11:40 +0000 Subject: [PATCH] fixed a thread state error fixed an error freeing memory that was never allocated git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/controls2.i | 2 ++ wxPython/src/helpers.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wxPython/src/controls2.i b/wxPython/src/controls2.i index 67278c97d0..945533fe2d 100644 --- a/wxPython/src/controls2.i +++ b/wxPython/src/controls2.i @@ -410,7 +410,9 @@ public: } void SetData(PyObject* obj) { + bool doSave = wxPyRestoreThread(); Py_DECREF(m_obj); + wxPySaveThread(doSave); m_obj = obj; Py_INCREF(obj); } diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index 131d387c9c..6d0cb21730 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -170,7 +170,7 @@ PyObject* __wxStart(PyObject* /* self */, PyObject* args) char** argv = new char*[argc+1]; int x; for(x=0; xargc = argc;