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); } }