v0.8.2d: adjusted new bag logic to prevent a rare crash

This commit is contained in:
Evan Debenham 2020-08-29 19:04:00 -04:00
parent a53a90bba9
commit 67627f7a2f

View File

@ -92,8 +92,8 @@ public class Bag extends Item implements Iterable<Item> {
}
public void grabItems(){
if (this != Dungeon.hero.belongings.backpack) {
grabItems(Dungeon.hero.belongings.backpack);
if (owner != null && owner instanceof Hero && this != ((Hero) owner).belongings.backpack) {
grabItems(((Hero) owner).belongings.backpack);
}
}