mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-09-11 21:45:43 -04:00
more error handling for null creatures
This commit is contained in:
@@ -1149,7 +1149,8 @@ public class ObjectService implements INetworkDispatch {
|
||||
return;
|
||||
}
|
||||
CreatureObject creature = null;
|
||||
if(getObject(objectId) == null) {
|
||||
|
||||
if(objectId != 0 && objectId != 0L && getObject(objectId) == null) {
|
||||
creature = getCreatureFromDB(objectId);
|
||||
if(creature == null) {
|
||||
System.err.println("Cant get creature from db");
|
||||
@@ -1166,7 +1167,7 @@ public class ObjectService implements INetworkDispatch {
|
||||
} else {
|
||||
|
||||
if (!(getObject(objectId) instanceof CreatureObject)) {
|
||||
System.out.println("Character is not an instance of CreatureObject!");
|
||||
System.out.println("Character is not an instance of CreatureObject or is null!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user