diff --git a/src/mac/app.cpp b/src/mac/app.cpp index aab9d27580..0e4ce104f2 100644 --- a/src/mac/app.cpp +++ b/src/mac/app.cpp @@ -670,6 +670,8 @@ void wxApp::CleanUp() #if wxUSE_THREADS delete wxPendingEventsLocker; + // There is still more cleanup code that will try to use this if not NULL. + wxPendingEventsLocker = NULL; // If we don't do the following, we get an apparent memory leak. ((wxEvtHandler&) wxDefaultValidator).ClearEventLocker(); #endif diff --git a/src/mac/carbon/app.cpp b/src/mac/carbon/app.cpp index aab9d27580..0e4ce104f2 100644 --- a/src/mac/carbon/app.cpp +++ b/src/mac/carbon/app.cpp @@ -670,6 +670,8 @@ void wxApp::CleanUp() #if wxUSE_THREADS delete wxPendingEventsLocker; + // There is still more cleanup code that will try to use this if not NULL. + wxPendingEventsLocker = NULL; // If we don't do the following, we get an apparent memory leak. ((wxEvtHandler&) wxDefaultValidator).ClearEventLocker(); #endif