Neither of these should be null. I should not have to check they aren't null. But apparently they can be. So I do. Fixes #402.
This commit is contained in:
@@ -635,7 +635,7 @@ public final class WizardryUtilities {
|
||||
// This is a perfect example of where you need to use .equals() and not ==. For most applications,
|
||||
// this was unnoticeable until world reload because the UUID instance or entity instance is stored.
|
||||
// Fixed now though.
|
||||
if(entity.getUniqueID().equals(id)){
|
||||
if(entity != null && entity.getUniqueID() != null && entity.getUniqueID().equals(id)){
|
||||
return entity;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user