[Fix] Segfault when player dies.
This commit is contained in:
parent
7a66419f7c
commit
bbc46d0eef
@ -13,7 +13,7 @@
|
||||
#include "spfx.h"
|
||||
#include "weapon.h"
|
||||
|
||||
#define weapon_isSmart(w) (w->think)
|
||||
#define weapon_isSmart(w) (w->think != NULL)
|
||||
|
||||
#define VOICE_PRIORITY_BOLT 10 /* Default. */
|
||||
#define VOICE_PRIORITY_AMMO 8 /* Higher. */
|
||||
@ -263,6 +263,8 @@ static void weapon_update(Weapon* w, const double dt, WeaponLayer layer) {
|
||||
gl_getSpriteFromDir(&wsx, &wsy, gfx, w->solid->dir);
|
||||
|
||||
for(i = 0; i < pilot_nstack; i++) {
|
||||
/* Check for player to exist. */
|
||||
if((i == 0) && (player == NULL)) continue;
|
||||
psx = pilot_stack[i]->tsx;
|
||||
psy = pilot_stack[i]->tsy;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user