From c25f325f8724827f91e3f47e8854178c7f9b1f13 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 26 Apr 2024 16:15:07 -0400 Subject: [PATCH] Null check added for city --- src/engine/net/client/handlers/ItemProductionMsgHandler.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/engine/net/client/handlers/ItemProductionMsgHandler.java b/src/engine/net/client/handlers/ItemProductionMsgHandler.java index 26237bf2..8dda9592 100644 --- a/src/engine/net/client/handlers/ItemProductionMsgHandler.java +++ b/src/engine/net/client/handlers/ItemProductionMsgHandler.java @@ -393,6 +393,11 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { WorkOrder workOrder = ForgeManager.itemWorkOrderLookup.get(virtualItem); City city = workOrder.vendor.building.getCity(); + + if (city == null) + return; + ; + city.transactionLock.writeLock().lock(); try {