From: Diederick Niehorster Date: Tue, 18 Dec 2012 05:19:21 +0000 (+0000) Subject: avoid crash on null temp_window, thanks Phillip Kutin! X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=e5a04661cc5c65771163df9844ee02d2a46955f0;p=freeglut avoid crash on null temp_window, thanks Phillip Kutin! git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1490 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/src/mswin/fg_main_mswin.c b/src/mswin/fg_main_mswin.c index 9617875..4588ef6 100644 --- a/src/mswin/fg_main_mswin.c +++ b/src/mswin/fg_main_mswin.c @@ -269,7 +269,7 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, if (hwnd) /* can be NULL if mouse outside parent by the time we get here */ { temp_window = fgWindowByHandle(hwnd); - if (temp_window->Parent) /* Verify we got a child window */ + if (temp_window && temp_window->Parent) /* Verify we got a child window */ child_window = temp_window; } }