aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCustomKeybinds.kt7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCustomKeybinds.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCustomKeybinds.kt
index 73a336eaa..e5338cebc 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCustomKeybinds.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCustomKeybinds.kt
@@ -99,8 +99,11 @@ class GardenCustomKeybinds {
}
private fun KeyBinding.unpressKeyIfDown() {
- if (KeybindHelper.isKeyDown(keyCode)) {
- (this as AccessorKeyBinding).skyhanni_unpressKey()
+ try {
+ if (KeybindHelper.isKeyDown(keyCode)) {
+ (this as AccessorKeyBinding).skyhanni_unpressKey()
+ }
+ } catch (_: IllegalStateException) {
}
}