mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-01 02:16:15 -04:00
Fixed null error
This commit is contained in:
@@ -544,7 +544,11 @@ public class ObjectService implements INetworkDispatch {
|
||||
while (cursor.hasNext()) {
|
||||
SWGObject object = (SWGObject) cursor.next();
|
||||
|
||||
if (object != null && object.getCustomName() != null && customName.length() > 0 && object.getCustomName().equals(customName)) {
|
||||
if (object == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (object.getCustomName() != null && customName.length() > 0 && object.getCustomName().equals(customName)) {
|
||||
return object;
|
||||
}
|
||||
}
|
||||
@@ -572,7 +576,11 @@ public class ObjectService implements INetworkDispatch {
|
||||
while (cursor.hasNext()) {
|
||||
SWGObject object = (SWGObject) cursor.next();
|
||||
|
||||
if (object != null && object.getCustomName() != null && customName.length() > 0 && object.getCustomName().startsWith(customName)) {
|
||||
if (object == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (object.getCustomName() != null && customName.length() > 0 && object.getCustomName().startsWith(customName)) {
|
||||
return object;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user