Skip to content

Commit

Permalink
Fix a crash with casting Metabolic Englaciation against the player
Browse files Browse the repository at this point in the history
Only player ghosts can do this presently, I believe?
  • Loading branch information
DracoOmega committed Apr 27, 2024
1 parent 15cee8b commit f613fa2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crawl-ref/source/spl-monench.cc
Expand Up @@ -34,8 +34,9 @@ int englaciate(coord_def where, int pow, actor *agent)
monster* mons = victim->as_monster();

// Skip some ineligable monster categories
if (mons_is_conjured(mons->type) || mons_is_firewood(*mons)
|| mons_is_tentacle_segment(mons->type))
if (mons &&
(mons_is_conjured(mons->type) || mons_is_firewood(*mons)
|| mons_is_tentacle_segment(mons->type)))
{
return 0;
}
Expand Down

0 comments on commit f613fa2

Please sign in to comment.