diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java index 23b3a20b8..4386eab59 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java @@ -411,7 +411,7 @@ public abstract class RegularLevel extends Level { //chance to find a page scales with pages missing and depth float dropChance = (missingPages.size() + Dungeon.depth - 1) / (float)(allPages.size() - 2); - if (Random.Float() < dropChance){ + if (!missingPages.isEmpty() && Random.Float() < dropChance){ GuidePage p = new GuidePage(); p.page(missingPages.get(0)); int cell = randomDropCell();