summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ouch.cc
diff options
context:
space:
mode:
authorCharles Otto <ottochar@gmail.com>2009-11-13 21:34:59 -0500
committerCharles Otto <ottochar@gmail.com>2009-11-13 21:35:55 -0500
commit9e438662873c5b74baefce84f2da4a018e3b9d3f (patch)
tree32752227aad4b02dab606bcf0971adea21385b25 /crawl-ref/source/ouch.cc
parent3975eefb99b5b2bc5b5b598d36cd5f635053f3fc (diff)
downloadcrawl-ref-9e438662873c5b74baefce84f2da4a018e3b9d3f.tar.gz
crawl-ref-9e438662873c5b74baefce84f2da4a018e3b9d3f.zip
Fix a crash when _passive_freeze is called with NULL aux
ouch can get called with a NULL aux parameter (for example by splash_with_acid), passing that null pointer to _passive_freeze was causing a crash.
Diffstat (limited to 'crawl-ref/source/ouch.cc')
-rw-r--r--crawl-ref/source/ouch.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index a0d001fd3c..06f8eb2d09 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -869,7 +869,7 @@ static void _yred_mirrors_injury(int dam, int death_source)
static void _passive_freeze(kill_method_type death_type, const char *aux,
int death_source)
{
- const char *ptr = strstr(aux, "torment");
+ const char *ptr = aux ? strstr(aux, "torment") : NULL;
if (you.mutation[MUT_PASSIVE_FREEZE] && death_type == KILLED_BY_MONSTER
&& ptr == NULL)
{