diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-10-19 05:08:38 -0700 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-10-19 05:08:38 -0700 |
commit | 2cc88c3a5135766236f07916506ee13d651f173f (patch) | |
tree | fb75254b1d0c58deaabc6543e9437de73180fad7 /crawl-ref/source/fight.cc | |
parent | a94b70783e1f4a0d1dd444c7c95a374ad2a140ca (diff) | |
download | crawl-ref-2cc88c3a5135766236f07916506ee13d651f173f.tar.gz crawl-ref-2cc88c3a5135766236f07916506ee13d651f173f.zip |
fight.cc: Fix undrandart/unarmed crash
The game would crash if a monster wielding an unrandart with a special
melee function could do an armed an unarmed attack in the same round.
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r-- | crawl-ref/source/fight.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index df0c080620..4976e87c01 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -540,7 +540,7 @@ bool melee_attack::check_unrand_effects(bool mondied) // unrand_entry->fight_func, since that's the function used for // launched missiles. if (unrand_entry && unrand_entry->fight_func.melee_effects - && fires_ammo_type(*weapon) == MI_NONE) + && weapon && fires_ammo_type(*weapon) == MI_NONE) { unrand_entry->fight_func.melee_effects(weapon, attacker, defender, mondied); |