# HG changeset patch # User John "Elwin" Edwards # Date 1430842340 14400 # Node ID 856017d63519105c3b8013ea90d0830d191c9767 # Parent 0d151573bdb04a44ab6b75edeb6234e460541e2b xrogue: don't segfault when backstabbing while empty-handed. The code for backstabbing checked the weapon's properties without making sure it was not NULL. diff -r 0d151573bdb0 -r 856017d63519 xrogue/fight.c --- a/xrogue/fight.c Tue May 05 12:07:12 2015 -0400 +++ b/xrogue/fight.c Tue May 05 12:12:20 2015 -0400 @@ -677,7 +677,8 @@ if (mult > 5) mult = 5; - if (weap->o_type == RELIC && weap->o_which == MUSTY_DAGGER) + if (weap && weap->o_type == RELIC && + weap->o_which == MUSTY_DAGGER) mult++; damage *= mult; }