summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-pathfind.cc
diff options
context:
space:
mode:
authorDracoOmega <draco_omega@live.com>2013-06-24 06:18:30 -0230
committerDracoOmega <draco_omega@live.com>2013-06-24 06:19:36 -0230
commit465755622d653e76638a3a64e29f2ff7857d3a68 (patch)
treed0c6eb6a957b9521dedf212e1cf096967f441607 /crawl-ref/source/mon-pathfind.cc
parentea6b2e385d6f9e0df18a281e3115503daa5d34e4 (diff)
downloadcrawl-ref-465755622d653e76638a3a64e29f2ff7857d3a68.tar.gz
crawl-ref-465755622d653e76638a3a64e29f2ff7857d3a68.zip
Prevent a labyrinth crash
It seems monster_pathfind really CAN be called without a monster (for determining traversibility for labyrinth shifts, in this case). Oops.
Diffstat (limited to 'crawl-ref/source/mon-pathfind.cc')
-rw-r--r--crawl-ref/source/mon-pathfind.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-pathfind.cc b/crawl-ref/source/mon-pathfind.cc
index f3c2b88e75..a2acded317 100644
--- a/crawl-ref/source/mon-pathfind.cc
+++ b/crawl-ref/source/mon-pathfind.cc
@@ -417,7 +417,7 @@ bool monster_pathfind::traversable(const coord_def& p)
{
// XXX: Ugly hack to make thorn hunters use their briars for defensive
// cover instead of just pathing around them.
- if (mons->type == MONS_THORN_HUNTER
+ if (mons && mons->type == MONS_THORN_HUNTER
&& monster_at(p)
&& monster_at(p)->type == MONS_BRIAR_PATCH)
{