diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt index 94716762f..1ae398e4c 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyErrorCommand.kt @@ -41,7 +41,9 @@ object CopyErrorCommand { Minecraft.getMinecraft().thePlayer ?: throw error error.printStackTrace() - val pair = throwable.stackTrace[0].let { it.fileName to it.lineNumber } + val pair = if (throwable.stackTrace.isNotEmpty()) { + throwable.stackTrace[0].let { it.fileName to it.lineNumber } + } else message to 0 if (cache.getIfPresent(pair) != null) return cache.put(pair, Unit) |