From a34de2b319560dd0a2e75b16729df6cfaf9daa12 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 22 Jun 2009 19:17:05 +0000 Subject: Apply crash fixes to trunk. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10017 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/monstuff.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/monstuff.cc') diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 60df56cedc..05305c5b0c 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -1443,11 +1443,16 @@ int monster_die(monsters *monster, killer_type killer, { bool notice = false; - monsters *killer_mon = &menv[killer_index]; - // If the killer is already dead treat it like an anonymous - // monster. - if (killer_mon->type == -1) - anon = true; + monsters *killer_mon; + if (!anon) + { + killer_mon = &menv[killer_index]; + + // If the killer is already dead treat it like an + // anonymous monster. + if (killer_mon->type == -1) + anon = true; + } const mon_holy_type killer_holy = anon ? MH_NATURAL : mons_holiness(killer_mon); -- cgit v1.2.3-54-g00ecf