diff options
author | Neil Moore <neil@s-z.org> | 2014-06-12 14:05:34 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2014-06-12 14:06:20 -0400 |
commit | 62da3a1b50ace201ebcccd202515e3685b5e3234 (patch) | |
tree | 84de9535e9db7a32c29ec450f059fce02bebb07b /crawl-ref/source/spl-summoning.cc | |
parent | e561a6638b9c70b2f3ad265faa83520c7af28226 (diff) | |
download | crawl-ref-62da3a1b50ace201ebcccd202515e3685b5e3234.tar.gz crawl-ref-62da3a1b50ace201ebcccd202515e3685b5e3234.zip |
Don't crash when unwielding a temp-branded weapon.
Diffstat (limited to 'crawl-ref/source/spl-summoning.cc')
-rw-r--r-- | crawl-ref/source/spl-summoning.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/spl-summoning.cc b/crawl-ref/source/spl-summoning.cc index 0bf3dc2bce..bad46f18d1 100644 --- a/crawl-ref/source/spl-summoning.cc +++ b/crawl-ref/source/spl-summoning.cc @@ -813,7 +813,10 @@ static void _animate_weapon(int pow, actor* target, bool force_friendly) { // Clear temp branding so we don't change the brand permanently. if (you.duration[DUR_WEAPON_BRAND]) - end_weapon_brand(); + { + ASSERT(you.weapon()); + end_weapon_brand(*wpn); + } // Mark weapon as "thrown", so we'll autopickup it later. cp.flags |= ISFLAG_THROWN; |