From 2d4459cbbfe1a40e14c262432b8cb73e2d2a9a6f Mon Sep 17 00:00:00 2001 From: James Brown Date: Thu, 20 Aug 2015 18:20:20 +0100 Subject: [PATCH] fix for null keyboard hook causing crash --- src/DockLib/DockWnd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/DockLib/DockWnd.c b/src/DockLib/DockWnd.c index ee4af20..96d0ecb 100644 --- a/src/DockLib/DockWnd.c +++ b/src/DockLib/DockWnd.c @@ -361,6 +361,9 @@ LRESULT DockPanel_OnNotify(DOCKPANEL *dpp, WPARAM wParam, NMHDR *hdr) static HHOOK g_hKeyboardHook; static LRESULT CALLBACK KeyboardProc(int code, WPARAM wParam, LPARAM lParam) { + if (g_hKeyboardHook == 0) + return 0; + if(code < 0) return CallNextHookEx(g_hKeyboardHook, code, wParam, lParam);