Check nullptr before calling the windows message hook for WM_ENTERSIZEMOVE and WM_ENTERMENULOOP

This commit is contained in:
WinterSquire authored and Sam Lantinga committed 2025-02-03 21:33:58 -08:00
1 parent e7f326a84e
commit eb5ab22032
1 file changed
+4 -2
+4 -2
View File
@@ -1721,8 +1721,10 @@ LRESULT CALLBACK WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
case WM_ENTERSIZEMOVE:
case WM_ENTERMENULOOP:
{
if (!DispatchModalLoopMessageHook(&hwnd, &msg, &wParam, &lParam)) {
return 0;
if (g_WindowsMessageHook) {
if (!DispatchModalLoopMessageHook(&hwnd, &msg, &wParam, &lParam)) {
return 0;
}
}
++data->in_modal_loop;