From 36e0c4c910c972bd07b87d57907a67a776727e3e Mon Sep 17 00:00:00 2001 From: yoyosource Date: Fri, 17 Nov 2023 18:18:55 +0100 Subject: [PATCH] Fix NPE for Point convertion to Pos --- .../de/steamwar/bausystem/features/script/lua/libs/LuaLib.java | 1 + 1 file changed, 1 insertion(+) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/LuaLib.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/LuaLib.java index 03ceb3ba..a4af0d3a 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/LuaLib.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/lua/libs/LuaLib.java @@ -71,6 +71,7 @@ public interface LuaLib { } default LuaTable toPos(Point point) { + if (point == null) return LuaTable.tableOf(); return LuaValue.tableOf(new LuaValue[] { LuaValue.valueOf("x"), LuaValue.valueOf(point.getX()), LuaValue.valueOf("y"), LuaValue.valueOf(point.getY()),