summaryrefslogtreecommitdiffstats
path: root/Common/NativeApp/src/Win32
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-04-01 22:02:39 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-04-01 22:02:39 +0000
commit6badd197cd08a6e83fe907ffb00077aa99ea4e00 (patch)
treea5987e5b8e54a3afed38ca144c43eca1fb896eb4 /Common/NativeApp/src/Win32
parentUpdated core (diff)
parentUpdated readme (diff)
downloadDiligentEngine-6badd197cd08a6e83fe907ffb00077aa99ea4e00.tar.gz
DiligentEngine-6badd197cd08a6e83fe907ffb00077aa99ea4e00.zip
Merged master
Diffstat (limited to 'Common/NativeApp/src/Win32')
-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)
{