summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-22 19:17:05 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-22 19:17:05 +0000
commita34de2b319560dd0a2e75b16729df6cfaf9daa12 (patch)
tree84452dd0a0a6e5bade474e0b8fdf4155931ad04f /crawl-ref/source/monstuff.cc
parent53b94b89c7037837eb6bf00ea8b71d9f92963f35 (diff)
downloadcrawl-ref-a34de2b319560dd0a2e75b16729df6cfaf9daa12.tar.gz
crawl-ref-a34de2b319560dd0a2e75b16729df6cfaf9daa12.zip
Apply crash fixes to trunk.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10017 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc15
1 files changed, 10 insertions, 5 deletions
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);