X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9787a4b6ad61ad6f938c308069fabf45057af30f..79c3b7b216a5fc6b105acb49690e5b4e626080e2:/src/msw/app.cpp?ds=inline diff --git a/src/msw/app.cpp b/src/msw/app.cpp index a0c1e2cda0..378dccbe3e 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -115,8 +115,7 @@ #define _WIN32_IE 0x0200 #endif -#if _WIN32_IE >= 0x0300 \ - && !( defined(__MINGW32__) && !wxCHECK_W32API_VERSION( 1, 0 ) ) +#if _WIN32_IE >= 0x0300 && !defined(__MINGW32__) #include #endif @@ -1156,12 +1155,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