From bbefe8aee0477e1e17501685d11e178b3429a8d6 Mon Sep 17 00:00:00 2001 From: dcnieho Date: Tue, 18 Dec 2012 05:19:21 +0000 Subject: [PATCH] avoid crash on null temp_window, thanks Phillip Kutin! git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1490 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/src/mswin/fg_main_mswin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freeglut/freeglut/src/mswin/fg_main_mswin.c b/freeglut/freeglut/src/mswin/fg_main_mswin.c index 9617875..4588ef6 100644 --- a/freeglut/freeglut/src/mswin/fg_main_mswin.c +++ b/freeglut/freeglut/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; } }