Merge pull request #18566 from Nemoumbra/debugger-ui-fix

Stop opening some context menus when the game's not loaded
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2023-12-17 16:31:41 +01:00
commit 6140321be5
3 files changed
+21

No files matched your search

+6
View File
@@ -954,6 +954,12 @@ void CtrlDisAsmView::onMouseUp(WPARAM wParam, LPARAM lParam, int button)
}
else if (button == 2)
{
// We don't want to let the users play with deallocated or uninitialized debugging objects
GlobalUIState state = GetUIState();
if (state != UISTATE_INGAME && state != UISTATE_PAUSEMENU) {
return;
}
switch (TriggerContextMenu(ContextMenuID::DISASM, wnd, ContextPoint::FromEvent(lParam)))
{
case ID_DISASM_GOTOINMEMORYVIEW: