From 5e6cec5bcf252c0d9e0cb4f9eeb8bc42cce3c2f0 Mon Sep 17 00:00:00 2001 From: Nikolay Kostov Date: Sun, 23 Aug 2020 17:11:10 +0300 Subject: [PATCH] Fix in Dispose of KeystrokeAPI --- Keystroke.API/KeystrokeAPI.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Keystroke.API/KeystrokeAPI.cs b/Keystroke.API/KeystrokeAPI.cs index bf728fc..c6a046c 100644 --- a/Keystroke.API/KeystrokeAPI.cs +++ b/Keystroke.API/KeystrokeAPI.cs @@ -78,7 +78,7 @@ private void KeyParser(IntPtr wParam, IntPtr lParam, bool shiftPressed, bool cap public void Dispose() { - if (globalKeyboardHookId == IntPtr.Zero) + if (globalKeyboardHookId != IntPtr.Zero) User32.UnhookWindowsHookEx(globalKeyboardHookId); } }