mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- added a few NULL pointer checks to protect against problems caused by actors being spawned during engine shutdown.
SVN r2279 (trunk)
This commit is contained in:
parent
d916127ecf
commit
c7272075d3
1 changed files with 12 additions and 3 deletions
|
@ -593,7 +593,10 @@ bool AActor::SetState (FState *newstate)
|
|||
newstate = newstate->GetNextState();
|
||||
} while (tics == 0);
|
||||
|
||||
screen->StateChanged(this);
|
||||
if (screen != NULL)
|
||||
{
|
||||
screen->StateChanged(this);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -653,7 +656,10 @@ bool AActor::SetStateNF (FState *newstate)
|
|||
newstate = newstate->GetNextState();
|
||||
} while (tics == 0);
|
||||
|
||||
screen->StateChanged(this);
|
||||
if (screen != NULL)
|
||||
{
|
||||
screen->StateChanged(this);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3693,7 +3699,10 @@ AActor *AActor::StaticSpawn (const PClass *type, fixed_t ix, fixed_t iy, fixed_t
|
|||
{
|
||||
level.total_items++;
|
||||
}
|
||||
screen->StateChanged(actor);
|
||||
if (screen != NULL)
|
||||
{
|
||||
screen->StateChanged(actor);
|
||||
}
|
||||
return actor;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue