summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authorCharles Otto <ottochar@gmail.com>2009-11-08 14:50:43 -0500
committerCharles Otto <ottochar@gmail.com>2009-11-08 14:55:42 -0500
commitf5c61bd43ba6fc429cc424c0ea9acfd426c77b2c (patch)
treed3d45f56771ab74c92718babb359a4556c981696 /crawl-ref/source/fight.cc
parent9aa4d9bc6f48a9a2b81e7525b4ae142b60b11cbd (diff)
downloadcrawl-ref-f5c61bd43ba6fc429cc424c0ea9acfd426c77b2c.tar.gz
crawl-ref-f5c61bd43ba6fc429cc424c0ea9acfd426c77b2c.zip
Fix a crash when the player is hit by a distortion weapon
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 39439c841d..8aef88b8a3 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -2256,7 +2256,8 @@ bool melee_attack::distortion_affects_defender()
//jmf: blink frogs *like* distortion
// I think could be amended to let blink frogs "grow" like
// jellies do {dlb}
- if (mons_genus(defender_as_monster()->type) == MONS_BLINK_FROG)
+ if (defender->atype() == ACT_MONSTER
+ && mons_genus(defender_as_monster()->type) == MONS_BLINK_FROG)
{
if (one_chance_in(5))
{