From 2cc88c3a5135766236f07916506ee13d651f173f Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Mon, 19 Oct 2009 05:08:38 -0700 Subject: 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. --- crawl-ref/source/fight.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crawl-ref/source') 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); -- cgit v1.2.3-54-g00ecf