Merge pull request #226 from Frank-74/patch-1

Final fix for Glide About/Config crash and memory leaks
This commit is contained in:
zilmar 2015-03-06 22:04:12 +11:00
commit 60162d6c9b
1 changed files with 4 additions and 2 deletions

View File

@ -1116,13 +1116,14 @@ void CALL DllConfig ( HWND hParent )
hostWindow = new wxWindow(); hostWindow = new wxWindow();
WXHWND hwnd = hParent; WXHWND hwnd = hParent;
hostWindow->SetHWND(hwnd); hostWindow->SetHWND(hwnd);
hostWindow->SubclassWin(hwnd); // hostWindow->SubclassWin(hwnd);
hostWindow->Disable(); hostWindow->Disable();
#endif #endif
Glide64ConfigDialog* Glide64Config = new Glide64ConfigDialog(hostWindow, wxID_ANY, wxEmptyString); Glide64ConfigDialog* Glide64Config = new Glide64ConfigDialog(hostWindow, wxID_ANY, wxEmptyString);
Glide64Config->ShowModal(); Glide64Config->ShowModal();
delete hostWindow; delete hostWindow;
hostWindow = NULL;
} }
/*#ifndef _DEBUG /*#ifndef _DEBUG
@ -1149,7 +1150,7 @@ void CloseConfig()
} }
#ifdef __WINDOWS__ #ifdef __WINDOWS__
hostWindow->Enable(); hostWindow->Enable();
hostWindow->UnsubclassWin(); // hostWindow->UnsubclassWin();
hostWindow->SetHWND(NULL); hostWindow->SetHWND(NULL);
#endif #endif
mutexProcessDList->Unlock(); mutexProcessDList->Unlock();
@ -1306,5 +1307,6 @@ void CALL DllAbout ( HWND hParent )
// hostWindow->UnsubclassWin(); // hostWindow->UnsubclassWin();
hostWindow->SetHWND(NULL); hostWindow->SetHWND(NULL);
delete hostWindow; delete hostWindow;
hostWindow = NULL;
#endif #endif
} }