From 0e44cae1e30d8b05e17d7b3e93e680ac1adfb6ee Mon Sep 17 00:00:00 2001 From: Yeechan Lu Date: Tue, 28 Jan 2014 21:23:50 +0800 Subject: [PATCH] Fixed: Calling null callback "hookedKeyboardCallback" --- WinAlfred/Helper/KeyboardListener.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WinAlfred/Helper/KeyboardListener.cs b/WinAlfred/Helper/KeyboardListener.cs index 01a9e1c02..264e6a8be 100644 --- a/WinAlfred/Helper/KeyboardListener.cs +++ b/WinAlfred/Helper/KeyboardListener.cs @@ -101,7 +101,8 @@ namespace WinAlfred.Helper wParam.ToUInt32() == (int)KeyEvent.WM_SYSKEYDOWN || wParam.ToUInt32() == (int)KeyEvent.WM_SYSKEYUP) { - continues = hookedKeyboardCallback((KeyEvent)wParam.ToUInt32(), Marshal.ReadInt32(lParam), CheckModifiers()); + if (hookedKeyboardCallback != null) + continues = hookedKeyboardCallback((KeyEvent)wParam.ToUInt32(), Marshal.ReadInt32(lParam), CheckModifiers()); } }