From 25f2c488677e822ccf7c4b1a433efc6579ec5e6d Mon Sep 17 00:00:00 2001 From: Jochen Tucht Date: Sun, 26 Oct 2008 10:50:15 +0000 Subject: [PATCH] Fix a crash during exit observed on Windows Vista --- Externals/heksedit/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Externals/heksedit/main.cpp b/Externals/heksedit/main.cpp index cca78f7d0..f3c4d71ba 100644 --- a/Externals/heksedit/main.cpp +++ b/Externals/heksedit/main.cpp @@ -189,7 +189,7 @@ int WINAPI WinMain(HINSTANCE hIconInstance, HINSTANCE, char *szCmdLine, int) while (GetMessage(&msg, NULL, 0, 0)) { - if (!pHexWnd->translate_accelerator(&msg)) + if (!pHexWnd || !pHexWnd->translate_accelerator(&msg)) { TranslateMessage(&msg); DispatchMessage(&msg); @@ -309,6 +309,7 @@ LRESULT CALLBACK MainWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) pHexWnd->iWindowHeight = wndpl.rcNormalPosition.bottom - pHexWnd->iWindowY; pHexWnd->save_ini_data(); DragAcceptFiles(hwndMain, FALSE); + pHexWnd = 0; PostQuitMessage(0); } break; -- 2.11.0