Clean up double creation of memory debugger.

This commit is contained in:
Unknown W. Brackets committed 2014-02-14 21:17:36 -08:00
1 parent 8f09a341df
commit d0d4e665d1
5 files changed
+39 -8

No files matched your search

+2 -2
View File
@@ -343,7 +343,6 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
CtrlRegisterList::init();
CGEDebugger::Init();
DialogManager::AddDlg(memoryWindow[0] = new CMemoryDlg(_hInstance, hwndMain, currentDebugMIPS));
DialogManager::AddDlg(vfpudlg = new CVFPUDlg(_hInstance, hwndMain, currentDebugMIPS));
host = new WindowsHost(hwndMain, hwndDisplay);
@@ -380,7 +379,7 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
accel = hAccelTable;
break;
case WINDOW_CPUDEBUGGER:
wnd = disasmWindow[0]->GetDlgHandle();
wnd = disasmWindow[0] ? disasmWindow[0]->GetDlgHandle() : 0;
accel = hDebugAccelTable;
break;
case WINDOW_GEDEBUGGER:
@@ -405,6 +404,7 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
EmuThread_Stop();
MainWindow::DestroyDebugWindows();
DialogManager::DestroyAll();
timeEndPeriod(1);
delete host;