mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-14 04:13:14 -04:00
Fixed some nulls that can occur locally
This commit is contained in:
@@ -524,7 +524,9 @@ public class NGECore {
|
||||
List<CreatureObject> deletedObjects = new ArrayList<CreatureObject>();
|
||||
|
||||
while(cursor.hasNext()) {
|
||||
SWGObject creature = (SWGObject) cursor.next();
|
||||
Object next = cursor.next();
|
||||
if (next == null) continue;
|
||||
SWGObject creature = (SWGObject) next;
|
||||
if(!characterService.playerExists(creature.getObjectID()) && creature instanceof CreatureObject)
|
||||
deletedObjects.add((CreatureObject) creature);
|
||||
}
|
||||
|
||||
@@ -193,7 +193,9 @@ public class SimulationService implements INetworkDispatch {
|
||||
ODBCursor cursor = core.getSWGObjectODB().getCursor();
|
||||
|
||||
while(cursor.hasNext()) {
|
||||
SWGObject building = core.objectService.getObject(((SWGObject) cursor.next()).getObjectID());
|
||||
Object next = cursor.next();
|
||||
if (next == null) continue;
|
||||
SWGObject building = core.objectService.getObject(((SWGObject) next).getObjectID());
|
||||
if(building == null || (!(building instanceof BuildingObject) && !(building instanceof HarvesterObject)))
|
||||
continue;
|
||||
if(building.getAttachment("hasLoadedServerTemplate") == null)
|
||||
|
||||
Reference in New Issue
Block a user