From 041a258ab252ee25fbb2c13c871872eba250670b Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 7 Mar 2007 13:24:12 +0000 Subject: [PATCH] do not crash when missing curseinfo --- src/common/spells/regioncurse.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/spells/regioncurse.c b/src/common/spells/regioncurse.c index acd98d52c..220caa12e 100644 --- a/src/common/spells/regioncurse.c +++ b/src/common/spells/regioncurse.c @@ -166,8 +166,10 @@ cinfo_antimagiczone(const struct locale * lang, const void * obj, typ_t typ, cur /* Magier spüren eine Antimagiezone */ if (self == 2 || self == 1){ msg = msg_message("curseinfo::antimagiczone", "id", c->no); - nr_render(msg, lang, buf, sizeof(buf), NULL); - msg_release(msg); + if (msg) { + nr_render(msg, lang, buf, sizeof(buf), NULL); + msg_release(msg); + } return 1; }