From a02a5f2c0d5da43b09cf67d1d29b1a9da7a4b6a3 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 16 Sep 2014 20:04:37 -0400 Subject: [PATCH] V0.2.0a: Fixed crashing on deleted items when loading saves. --- .../shatteredpixel/shatteredpixeldungeon/items/bags/Bag.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/bags/Bag.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/bags/Bag.java index d69f35167..36979f843 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/bags/Bag.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/bags/Bag.java @@ -117,7 +117,7 @@ public class Bag extends Item implements Iterable { public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); for (Bundlable item : bundle.getCollection( ITEMS )) { - ((Item)item).collect( this ); + if (item != null) ((Item)item).collect( this ); }; }