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
+2
+2
View File
@@ -1721,9 +1721,11 @@ LRESULT CALLBACK WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
case WM_ENTERSIZEMOVE: case WM_ENTERSIZEMOVE:
case WM_ENTERMENULOOP: case WM_ENTERMENULOOP:
{ {
if (g_WindowsMessageHook) {
if (!DispatchModalLoopMessageHook(&hwnd, &msg, &wParam, &lParam)) { if (!DispatchModalLoopMessageHook(&hwnd, &msg, &wParam, &lParam)) {
return 0; return 0;
} }
}
++data->in_modal_loop; ++data->in_modal_loop;
if (data->in_modal_loop == 1) { if (data->in_modal_loop == 1) {