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.
This commit is contained in:
John "Elwin" Edwards 2015-05-12 18:57:30 -04:00
parent e8f5429554
commit 3bcf8ac2c1

View file

@ -638,7 +638,8 @@ bool back_stab;
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;
}