v0.3.3a: fixed a nullpointer in disintegration traps

This commit is contained in:
Evan Debenham 2015-12-24 01:22:43 -05:00
parent 6fa4192dcf
commit 2c87715af5

View File

@ -77,7 +77,7 @@ public class DisintegrationTrap extends Trap {
bag = (Bag)item; bag = (Bag)item;
item = Random.element(bag.items); item = Random.element(bag.items);
} }
if (item.level() > 0 || item.unique) return; if (item == null || item.level() > 0 || item.unique) return;
if (!item.stackable){ if (!item.stackable){
item.detachAll(bag); item.detachAll(bag);
GLog.w("the trap disintegrates your " + item.name() + "!"); GLog.w("the trap disintegrates your " + item.name() + "!");