mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-16 09:11:17 +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