summaryrefslogtreecommitdiffstats
path: root/Common/NativeApp/src
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-03-30 06:26:33 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-03-30 06:26:33 +0000
commitc3f655ff7ad02bb7c9c5e0f82b8854e90eecce2a (patch)
tree985e429b52b10cd8c04e5562c034aa02de0de6ea /Common/NativeApp/src
parentUpdated core: added adapter id to engine initialization (diff)
downloadDiligentEngine-c3f655ff7ad02bb7c9c5e0f82b8854e90eecce2a.tar.gz
DiligentEngine-c3f655ff7ad02bb7c9c5e0f82b8854e90eecce2a.zip
Fixed issue with Win32 MessageProc() not checking if g_pTheApp is null
Diffstat (limited to 'Common/NativeApp/src')
-rw-r--r--Common/NativeApp/src/Win32/WinMain.cpp9
1 files changed, 6 insertions, 3 deletions
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)
{