Avoid NPE on trying to delete non existant entity. Fixes MassiveCraft/Factions#722.

This commit is contained in:
Olof Larsson committed 2014-12-05 00:37:53 +01:00
1 parent 8777b9678f
commit 5f63d829e4
1 file changed
+3 -1
@@ -373,7 +373,9 @@ public class Coll<E> implements CollInterface<E>
if (oid == null) throw new NullPointerException("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);
return e;
}