diff --git a/src/engine/gameManager/BuildingManager.java b/src/engine/gameManager/BuildingManager.java index 4b2c4037..99672379 100644 --- a/src/engine/gameManager/BuildingManager.java +++ b/src/engine/gameManager/BuildingManager.java @@ -966,8 +966,10 @@ public enum BuildingManager { public static void bakeNavMesh(Building building) { - if (building.parentZone == null) + if (building.parentZone == null) { Logger.error("Attempt to bake navmesh with no parent: " + building.getObjectUUID()); + return; + } // Build up navmesh by stencil of the // convex hull meshes that comprise the prop. @@ -975,6 +977,11 @@ public enum BuildingManager { ArrayList> convexHullList; convexHullList = _hull_data.get(building.meshUUID); + if (convexHullList == null) { + Logger.error("Attempt to bake navmesh with no meshes: " + building.getObjectUUID()); + return; + } + for (ArrayList meshEntry : convexHullList) { Path2D.Float stencilPath = new Path2D.Float();