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.
This commit is contained in:
John "Elwin" Edwards 2015-05-05 12:12:20 -04:00
parent 85a0b26fa3
commit fb870fdb4e

View file

@ -677,7 +677,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;
}