From 6d9874302511c985e0aa820e00da1c94c14b644d Mon Sep 17 00:00:00 2001 From: Melledy <52122272+Melledy@users.noreply.github.com> Date: Fri, 29 Apr 2022 03:33:14 -0700 Subject: [PATCH] Prevent console error spam when attacking gadgets --- src/main/java/emu/grasscutter/game/world/Scene.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/emu/grasscutter/game/world/Scene.java b/src/main/java/emu/grasscutter/game/world/Scene.java index 9166499be..ee6b9a6a9 100644 --- a/src/main/java/emu/grasscutter/game/world/Scene.java +++ b/src/main/java/emu/grasscutter/game/world/Scene.java @@ -346,6 +346,11 @@ public class Scene { } } + // Sanity check + if (target.getFightProperties() == null) { + return; + } + // Lose hp target.addFightProperty(FightProperty.FIGHT_PROP_CUR_HP, -result.getDamage());