Fix a bug that KillMemView() calls multiple times to cause crash problems.
This commit is contained in:
parent
d4a8962695
commit
d5ff6ff2fe
|
@ -1179,15 +1179,17 @@ void AutoScrollFromCoord(int x,int y)
|
|||
}
|
||||
|
||||
void KillMemView()
|
||||
{
|
||||
if (hMemView)
|
||||
{
|
||||
ReleaseDC(hMemView, mDC);
|
||||
DestroyWindow(hMemView);
|
||||
UnregisterClass("MEMVIEW", fceu_hInstance);
|
||||
hMemView = 0;
|
||||
hMemFind = 0;
|
||||
hMemView = NULL;
|
||||
hMemFind = NULL;
|
||||
if (EditingMode == MODE_NES_MEMORY)
|
||||
ReleaseCheatMap();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
int GetMaxSize(int EditingMode)
|
||||
|
@ -2485,10 +2487,6 @@ LRESULT CALLBACK MemViewCallB(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
|||
|
||||
case WM_CLOSE:
|
||||
KillMemView();
|
||||
//ReleaseDC (hwnd, mDC) ;
|
||||
//DestroyWindow(hMemView);
|
||||
//UnregisterClass("MEMVIEW",fceu_hInstance);
|
||||
//hMemView = 0;
|
||||
return 0;
|
||||
}
|
||||
return DefWindowProc (hwnd, message, wParam, lParam) ;
|
||||
|
|
|
@ -372,7 +372,6 @@ void updateBookmarkMenus(HMENU menu)
|
|||
ModifyMenu(menu, ID_FIRST_BOOKMARK + hexBookmarks.shortcuts[i], MF_BYCOMMAND, ID_FIRST_BOOKMARK + hexBookmarks.shortcuts[i], buffer);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue