From 503d5db16c54bdb5c36a9d7d3b5fe193eaf6cec6 Mon Sep 17 00:00:00 2001 From: June <8020624+Cypher121@users.noreply.github.com> Date: Sat, 3 Dec 2022 06:22:05 +0100 Subject: [PATCH] Fix #343 --- .../petrak/hexcasting/api/spell/casting/CastingHarness.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/CastingHarness.kt b/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/CastingHarness.kt index e3b290ab..8c4fffa0 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/CastingHarness.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/CastingHarness.kt @@ -113,7 +113,11 @@ class CastingHarness private constructor( next.evaluate(continuation.next, world, this) } catch (mishap: Mishap) { val pattern = getPatternForFrame(next) - val operator = getOperatorForFrame(next, world) + val operator = try { + getOperatorForFrame(next, world) + } catch (e: Throwable) { + null + } CastResult( continuation, null,