summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/files.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r--crawl-ref/source/files.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index ae58bc66d8..10833e6141 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -962,11 +962,10 @@ static void _grab_followers()
// Handle nearby ghosts.
for (adjacent_iterator ai; ai; ++ai)
{
- if (mgrd(*ai) == NON_MONSTER)
+ monsters *fmenv = monster_at(*ai);
+ if (fmenv == NULL)
continue;
- monsters *fmenv = &menv[mgrd(*ai)];
-
if (fmenv->type == MONS_PLAYER_GHOST
&& fmenv->hit_points < fmenv->max_hit_points / 2)
{