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:
Electroblob77
2020-04-13 19:04:01 +01:00
parent 6ec2e716cb
commit c81830efec
@@ -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;
}
}