v0.9.3: added a couple safety checks to fix some crashes

This commit is contained in:
Evan Debenham 2021-05-26 20:34:48 -04:00
parent 06a9d12305
commit bc4db20ca7
2 changed files with 4 additions and 2 deletions

View File

@ -127,7 +127,9 @@ public class WildMagic extends ArmorAbility {
if (!wands.isEmpty()){ if (!wands.isEmpty()){
zapWand(wands, hero, target); zapWand(wands, hero, target);
} else { } else {
hero.buff(WildMagicTracker.class).detach(); if (hero.buff(WildMagicTracker.class) != null){
hero.buff(WildMagicTracker.class).detach();
}
Item.updateQuickslot(); Item.updateQuickslot();
Invisibility.dispel(); Invisibility.dispel();
hero.spendAndNext(Actor.TICK); hero.spendAndNext(Actor.TICK);

View File

@ -298,7 +298,7 @@ public class CavesBossLevel extends Level {
} }
GameScene.updateMap(); GameScene.updateMap();
customArenaVisuals.updateState(); if (customArenaVisuals != null) customArenaVisuals.updateState();
Dungeon.observe(); Dungeon.observe();