X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2809785e15e15fbb474140567c6f60452cd9a116..cda6fc01ba80a7a0cd159d10ccaeaea6573bf41b:/wxPython/src/helpers.cpp diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index b5ad3f8f6b..f37f539eca 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -97,6 +97,7 @@ PyObject* wxPyPtrTypeMap = NULL; // This gets run when the DLL is loaded. We just need to save a handle. //---------------------------------------------------------------------- +extern "C" BOOL WINAPI DllMain( HINSTANCE hinstDLL, // handle to DLL module DWORD fdwReason, // reason for calling function @@ -125,6 +126,8 @@ wxPyApp::wxPyApp() { wxPyApp::~wxPyApp() { + wxPythonApp = NULL; + wxApp::SetInstance(NULL); } @@ -407,11 +410,11 @@ void wxPyApp::_BootstrapApp() if (sysargv != NULL && executable != NULL) { argc = PyList_Size(sysargv) + 1; argv = new char*[argc+1]; - argv[0] = PyString_AsString(executable); + argv[0] = strdup(PyString_AsString(executable)); int x; for(x=1; x