mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 14:51:46 +00:00
Add NULL mthing check to P_SpawnPlayer
This commit is contained in:
parent
48b6b6e057
commit
174e00afe7
1 changed files with 4 additions and 0 deletions
|
@ -4603,6 +4603,10 @@ APlayerPawn *P_SpawnPlayer (FPlayerStart *mthing, int playernum, int flags)
|
||||||
fixed_t spawn_x, spawn_y, spawn_z;
|
fixed_t spawn_x, spawn_y, spawn_z;
|
||||||
angle_t spawn_angle;
|
angle_t spawn_angle;
|
||||||
|
|
||||||
|
if (mthing == NULL)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
// not playing?
|
// not playing?
|
||||||
if ((unsigned)playernum >= (unsigned)MAXPLAYERS || !playeringame[playernum])
|
if ((unsigned)playernum >= (unsigned)MAXPLAYERS || !playeringame[playernum])
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in a new issue