From 8316f89eb4d6b4f68bffaff2b4ab18ed0225acb5 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Tue, 11 Jun 2024 03:00:50 +0200 Subject: [PATCH] add NULL check --- src/directinput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/directinput.c b/src/directinput.c index e5e4dd5..bf5e3d5 100644 --- a/src/directinput.c +++ b/src/directinput.c @@ -34,7 +34,7 @@ static LPDIRECTINPUTDEVICEA g_mouse_device; static PROC hook_func(PROC* org_func, PROC new_func) { - if (!org_func) + if (!org_func || !new_func) return 0; PROC org = *org_func;