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
This commit is contained in:
@@ -410,7 +410,9 @@ public:
|
||||
}
|
||||
|
||||
void SetData(PyObject* obj) {
|
||||
bool doSave = wxPyRestoreThread();
|
||||
Py_DECREF(m_obj);
|
||||
wxPySaveThread(doSave);
|
||||
m_obj = obj;
|
||||
Py_INCREF(obj);
|
||||
}
|
||||
|
@@ -170,7 +170,7 @@ PyObject* __wxStart(PyObject* /* self */, PyObject* args)
|
||||
char** argv = new char*[argc+1];
|
||||
int x;
|
||||
for(x=0; x<argc; x++)
|
||||
argv[x] = PyString_AsString(PyList_GetItem(sysargv, x));
|
||||
argv[x] = copystring(PyString_AsString(PyList_GetItem(sysargv, x)));
|
||||
argv[argc] = NULL;
|
||||
|
||||
wxPythonApp->argc = argc;
|
||||
|
Reference in New Issue
Block a user