Fix Glide About/Config crash and memory leaks

No more memory leaks, and no more crashing.
This commit is contained in:
Frank-74 2015-03-06 09:25:37 +00:00
parent 2ef36f5f80
commit 30039150ec
1 changed files with 4 additions and 2 deletions

View File

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