Added cellId null check for static obj scripts

This commit is contained in:
Treeku
2014-05-16 11:56:34 +01:00
parent c2806c4ceb
commit 721ed17050
+5
View File
@@ -113,6 +113,11 @@ public class StaticService implements INetworkDispatch {
SWGObject cell = core.objectService.getObject(cellId);
if (cellId != 0 && cell == null) {
System.err.println("CellId invalid for template " + template);
return;
}
if (cell != null && cell.getContainer() != null && cell.getContainer() instanceof BuildingObject) {
buildingId = cell.getContainer().getObjectId();
cellNumber = ((BuildingObject) cell.getContainer()).getCellNumberByObjectId(cellId);