Merge pull request #1125 from Obique/master

Added null check to get rid of 'NULL Session' spam
This commit is contained in:
Zing
2014-08-09 15:50:26 -07:00
3 changed files with 4 additions and 3 deletions
Binary file not shown.
+2 -2
View File
@@ -78,7 +78,7 @@ public class CellObject extends SWGObject implements Serializable {
public void sendBaselines(Client destination) {
if(destination == null || destination.getSession() == null) {
System.out.println("NULL session");
System.out.println("NULL session [baseline]");
return;
}
@@ -91,7 +91,7 @@ public class CellObject extends SWGObject implements Serializable {
public void sendPermissionMessage(Client destination) {
if(destination == null || destination.getSession() == null) {
System.out.println("NULL session");
System.out.println("NULL session [permission]");
return;
}
+2 -1
View File
@@ -997,7 +997,6 @@ public class ObjectService implements INetworkDispatch {
}
CreatureObject creature = null;
if(getObject(objectId) == null) {
System.out.println("SelectCharacter: not in object list");
creature = getCreatureFromDB(objectId);
if(creature == null) {
System.out.println("Cant get creature from db");
@@ -1006,6 +1005,8 @@ public class ObjectService implements INetworkDispatch {
System.err.println("Name: " + creature.getCustomName());
System.out.println("Player with ObjID of " + creature.getObjectID() + " tried logging in but has a null/empty name!");
return;
} else {
System.out.println("SelectCharacter: not in object list");
}
}