# HG changeset patch # User John "Elwin" Edwards # Date 1431471450 14400 # Node ID 66b0263af4247cc0be79928abd42c2bdfe835420 # Parent 796e2a10cd41b55013f71d84463ed54b885dc59e arogue7: prevent segfaults when backstabbing while empty-handed. The calculation of the backstabbing multiplier checked the current weapon's properties without making sure the current weapon pointer was not NULL. diff -r 796e2a10cd41 -r 66b0263af424 arogue7/fight.c --- a/arogue7/fight.c Tue May 12 10:28:05 2015 -0400 +++ b/arogue7/fight.c Tue May 12 18:57:30 2015 -0400 @@ -638,7 +638,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; }