From de7f08602780413606f8ee544d7e916111102a53 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 24 Aug 2001 22:16:42 +0000 Subject: [PATCH] fix for calling GetWindowLong(NULL hwnd) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/app.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/msw/app.cpp b/src/msw/app.cpp index a0c1e2cda0..7297d4c352 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -1156,12 +1156,12 @@ bool wxApp::ProcessMessage(WXMSG *wxmsg) // we need to find the dialog containing this control as // IsDialogMessage() just eats all the messages (i.e. returns TRUE for // them) if we call it for the control itself - while ( ::GetWindowLong(hwnd, GWL_STYLE) & WS_CHILD ) + while ( hwnd && ::GetWindowLong(hwnd, GWL_STYLE) & WS_CHILD ) { hwnd = ::GetParent(hwnd); } - return ::IsDialogMessage(hwnd, msg) != 0; + return hwnd && ::IsDialogMessage(hwnd, msg) != 0; } #if wxUSE_TOOLTIPS