From c3f655ff7ad02bb7c9c5e0f82b8854e90eecce2a Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Thu, 29 Mar 2018 23:26:33 -0700 Subject: Fixed issue with Win32 MessageProc() not checking if g_pTheApp is null --- Common/NativeApp/src/Win32/WinMain.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Common/NativeApp/src/Win32/WinMain.cpp') diff --git a/Common/NativeApp/src/Win32/WinMain.cpp b/Common/NativeApp/src/Win32/WinMain.cpp index 6b53082..ff6b3b2 100644 --- a/Common/NativeApp/src/Win32/WinMain.cpp +++ b/Common/NativeApp/src/Win32/WinMain.cpp @@ -109,9 +109,12 @@ int WINAPI WinMain(HINSTANCE instance, HINSTANCE, LPSTR, int cmdShow) // Called every time the NativeNativeAppBase receives a message LRESULT CALLBACK MessageProc(HWND wnd, UINT message, WPARAM wParam, LPARAM lParam) { - auto res = g_pTheApp->HandleWin32Message(wnd, message, wParam, lParam); - if (res != 0) - return res; + if(g_pTheApp) + { + auto res = g_pTheApp->HandleWin32Message(wnd, message, wParam, lParam); + if (res != 0) + return res; + } switch (message) { -- cgit v1.2.3