diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-09-15 22:00:14 +0200 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-09-15 22:00:14 +0200 |
| commit | 6ad2ea688bd3af0305ebec63f46e09c68491736b (patch) | |
| tree | 2567b404d9541e35d5b44379f4b3fad6c933cbbe | |
| parent | 315414c3f6204a04a40d25262b0da187023f8cb7 (diff) | |
| download | SkyHanni-6ad2ea688bd3af0305ebec63f46e09c68491736b.tar.gz SkyHanni-6ad2ea688bd3af0305ebec63f46e09c68491736b.tar.bz2 SkyHanni-6ad2ea688bd3af0305ebec63f46e09c68491736b.zip | |
fixed ArrayIndexOutOfBoundsException
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/MinecraftConsoleFilter.kt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/MinecraftConsoleFilter.kt b/src/main/java/at/hannibal2/skyhanni/utils/MinecraftConsoleFilter.kt index 4ac0a78e8..b922e524c 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/MinecraftConsoleFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/MinecraftConsoleFilter.kt @@ -180,8 +180,12 @@ class MinecraftConsoleFilter(private val loggerConfigName: String) : Filter { val cause = thrown.cause if (cause != null) { debug("throw cause: '$cause'") - element = cause.stackTrace[0] - debug("thrown cause first element: '$element'") + if (cause.stackTrace.isNotEmpty()) { + element = cause.stackTrace[0] + debug("thrown cause first element: '$element'") + } else { + debug("thrown cause has no elements") + } } } } |
