Avoid NPE on trying to delete non existant entity. Fixes MassiveCraft/Factions#722.
This commit is contained in:
parent
8777b9678f
commit
5f63d829e4
@ -373,7 +373,9 @@ public class Coll<E> implements CollInterface<E>
|
|||||||
if (oid == null) throw new NullPointerException("oid");
|
if (oid == null) throw new NullPointerException("oid");
|
||||||
|
|
||||||
String id = this.fixId(oid);
|
String id = this.fixId(oid);
|
||||||
E e = this.get(id);
|
E e = this.get(id, false);
|
||||||
|
if (e == null) return null;
|
||||||
|
|
||||||
this.detach(e, id);
|
this.detach(e, id);
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user