mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-07 08:21:04 +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();
|
newstate = newstate->GetNextState();
|
||||||
} while (tics == 0);
|
} while (tics == 0);
|
||||||
|
|
||||||
screen->StateChanged(this);
|
if (screen != NULL)
|
||||||
|
{
|
||||||
|
screen->StateChanged(this);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -653,7 +656,10 @@ bool AActor::SetStateNF (FState *newstate)
|
||||||
newstate = newstate->GetNextState();
|
newstate = newstate->GetNextState();
|
||||||
} while (tics == 0);
|
} while (tics == 0);
|
||||||
|
|
||||||
screen->StateChanged(this);
|
if (screen != NULL)
|
||||||
|
{
|
||||||
|
screen->StateChanged(this);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3693,7 +3699,10 @@ AActor *AActor::StaticSpawn (const PClass *type, fixed_t ix, fixed_t iy, fixed_t
|
||||||
{
|
{
|
||||||
level.total_items++;
|
level.total_items++;
|
||||||
}
|
}
|
||||||
screen->StateChanged(actor);
|
if (screen != NULL)
|
||||||
|
{
|
||||||
|
screen->StateChanged(actor);
|
||||||
|
}
|
||||||
return actor;
|
return actor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue