mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-15 16:51:31 +00:00
- fixed: ChangeSpy didn't check if a player's camera's player pointer was valid before using it to get an index into the players table.
This commit is contained in:
parent
bc71d4537e
commit
805de60aa4
1 changed files with 4 additions and 1 deletions
|
@ -862,7 +862,10 @@ static void ChangeSpy (int changespy)
|
|||
int pnum = consoleplayer;
|
||||
if (changespy != SPY_CANCEL)
|
||||
{
|
||||
pnum = int(players[consoleplayer].camera->player - players);
|
||||
player_t *player = players[consoleplayer].camera->player;
|
||||
// only use the camera as starting index if it's a valid player.
|
||||
if (player != NULL) pnum = int(players[consoleplayer].camera->player - players);
|
||||
|
||||
int step = (changespy == SPY_NEXT) ? 1 : -1;
|
||||
|
||||
do
|
||||
|
|
Loading…
Reference in a new issue