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:
parent
e8f5429554
commit
3bcf8ac2c1
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue