From 534888260709fc4e7f7e06f4bb9cf79c9f93d1a1 Mon Sep 17 00:00:00 2001 From: phinner <62483793+phinner@users.noreply.github.com> Date: Wed, 6 Dec 2023 21:51:02 +0100 Subject: [PATCH] fix: Fix NPE in LogicImageListener --- .../xpdustry/imperium/mindustry/security/LogicImageListener.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/imperium-mindustry/src/main/kotlin/com/xpdustry/imperium/mindustry/security/LogicImageListener.kt b/imperium-mindustry/src/main/kotlin/com/xpdustry/imperium/mindustry/security/LogicImageListener.kt index e0bfcb82..93df30e2 100644 --- a/imperium-mindustry/src/main/kotlin/com/xpdustry/imperium/mindustry/security/LogicImageListener.kt +++ b/imperium-mindustry/src/main/kotlin/com/xpdustry/imperium/mindustry/security/LogicImageListener.kt @@ -194,6 +194,7 @@ class LogicImageListener(instances: InstanceManager) : ImperiumApplication.Liste var building = event.tile.build if (event.breaking && building is ConstructBlock.ConstructBuild && + building.prevBuild != null && !building.prevBuild.isEmpty) { building = building.prevBuild.first() }