From bec851a76875897ac454cfec715792a0bccf36b3 Mon Sep 17 00:00:00 2001 From: rainwarrior Date: Wed, 24 Aug 2016 18:20:44 +0000 Subject: [PATCH] Hex editor memview: prevent middle mouse button from attempting to "FreezeRam" when not in RAM mode. --- trunk/src/drivers/win/memview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trunk/src/drivers/win/memview.cpp b/trunk/src/drivers/win/memview.cpp index 9b0af3d7..d9f50c68 100644 --- a/trunk/src/drivers/win/memview.cpp +++ b/trunk/src/drivers/win/memview.cpp @@ -1770,10 +1770,11 @@ LRESULT CALLBACK MemViewCallB(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa } case WM_MBUTTONDOWN: { + if (EditingMode != MODE_NES_MEMORY) return 0; x = GET_X_LPARAM(lParam); y = GET_Y_LPARAM(lParam); i = GetAddyFromCoord(x,y); - if(i < 0)return 0; + if(i < 0) return 0; FreezeRam(i, 0, 1); return 0; }