Browse Source

Sanity check for null city.

postwipe-guilds
MagicBot 6 months ago
parent
commit
d257ce50cf
  1. 6
      src/engine/db/handlers/dbWarehouseHandler.java

6
src/engine/db/handlers/dbWarehouseHandler.java

@ -136,6 +136,12 @@ public class dbWarehouseHandler extends dbHandlerBase { @@ -136,6 +136,12 @@ public class dbWarehouseHandler extends dbHandlerBase {
int cityUID = rs.getInt("cityUUID");
JSONObject jsonObject = new JSONObject(rs.getString("warehouse"));
City city = City.getCity(cityUID);
if (city == null) {
Logger.error("No city " + cityUID + " for warehouse");
continue;
}
city.warehouse = new Warehouse(jsonObject);
city.warehouse.city = city;

Loading…
Cancel
Save