Prevent segfault when not wielding anything
This commit is contained in:
@@ -1077,7 +1077,7 @@ int final;
|
|||||||
* Skill with current weapon. Might help players who've never
|
* Skill with current weapon. Might help players who've never
|
||||||
* noticed #enhance or decided that it was pointless.
|
* noticed #enhance or decided that it was pointless.
|
||||||
*/
|
*/
|
||||||
if ((wtype = weapon_type(uwep)) != P_NONE && !is_ammo(uwep)) {
|
if (uwep && (wtype = weapon_type(uwep)) != P_NONE && !is_ammo(uwep)) {
|
||||||
char sklvlbuf[20];
|
char sklvlbuf[20];
|
||||||
int sklvl = P_SKILL(wtype);
|
int sklvl = P_SKILL(wtype);
|
||||||
boolean hav = (sklvl != P_UNSKILLED && sklvl != P_SKILLED);
|
boolean hav = (sklvl != P_UNSKILLED && sklvl != P_SKILLED);
|
||||||
|
|||||||
Reference in New Issue
Block a user