From d6b2249c78a2e4d80a6585997a55d7252ed5e680 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Sun, 1 Sep 2024 13:52:36 +0200 Subject: [PATCH] add missing NULL checks --- src/winapi_hooks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/winapi_hooks.c b/src/winapi_hooks.c index 78e18ff..1228626 100644 --- a/src/winapi_hooks.c +++ b/src/winapi_hooks.c @@ -1637,7 +1637,7 @@ HWND WINAPI fake_CreateWindowExA( /* Fallout 1/2 */ if (HIWORD(lpClassName) && _strcmpi(lpClassName, "GNW95 Class") == 0 && - strstr(lpWindowName, "FALLOUT")) + lpWindowName && strstr(lpWindowName, "FALLOUT")) { /* Workaround for window not showing up in taskbar sometimes */ dwExStyle |= WS_EX_APPWINDOW; @@ -1665,7 +1665,7 @@ HWND WINAPI fake_CreateWindowExA( } /* Center Lego Loco overlays */ - if (_strcmpi(lpWindowName, "LEGO LOCO") == 0 && + if (lpWindowName && _strcmpi(lpWindowName, "LEGO LOCO") == 0 && g_ddraw.ref && g_ddraw.hwnd && hWndParent == g_ddraw.hwnd && g_ddraw.width && (dwStyle & WS_POPUP))