From 67188ea5001f979c45ce5ce06df457074ad61789 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Mon, 27 Feb 2023 18:30:35 +0100 Subject: [PATCH] add NULL check --- src/winapi_hooks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/winapi_hooks.c b/src/winapi_hooks.c index e5b10ad..af24df5 100644 --- a/src/winapi_hooks.c +++ b/src/winapi_hooks.c @@ -557,7 +557,7 @@ BOOL WINAPI fake_PeekMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT w { BOOL result = real_PeekMessageA(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg); - if (result && g_ddraw->hook_peekmessage) + if (result && g_ddraw && g_ddraw->hook_peekmessage) { switch (lpMsg->message) {