mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-20 18:42:17 +00:00
- More missing null pointer checks.
This commit is contained in:
parent
0a9b20062a
commit
af566f2d52
1 changed files with 6 additions and 1 deletions
|
@ -5016,6 +5016,7 @@ AActor *P_SpawnPlayer (FPlayerStart *mthing, int playernum, int flags)
|
|||
|
||||
mobj = Spawn (p->cls, spawn, NO_REPLACE);
|
||||
|
||||
if (mobj == nullptr) return nullptr;
|
||||
if (level.flags & LEVEL_USEPLAYERSTARTZ)
|
||||
{
|
||||
if (spawn.Z == ONFLOORZ)
|
||||
|
@ -6065,6 +6066,8 @@ foundone:
|
|||
if (splash->SplashChunk)
|
||||
{
|
||||
mo = Spawn(splash->SplashChunk, pos, ALLOW_REPLACE);
|
||||
|
||||
if (!mo) return false;
|
||||
mo->target = thing;
|
||||
if (splash->ChunkXVelShift != 255)
|
||||
{
|
||||
|
@ -6364,7 +6367,7 @@ AActor *P_SpawnMissileXYZ (DVector3 pos, AActor *source, AActor *dest, PClassAct
|
|||
P_PlaySpawnSound(th, source);
|
||||
|
||||
// record missile's originator
|
||||
if (owner == NULL) owner = source;
|
||||
if (owner == nullptr) owner = source;
|
||||
th->target = owner;
|
||||
|
||||
double speed = th->Speed;
|
||||
|
@ -6735,6 +6738,8 @@ AActor *P_SpawnPlayerMissile (AActor *source, double x, double y, double z,
|
|||
}
|
||||
DVector3 pos = source->Vec2OffsetZ(x, y, z);
|
||||
AActor *MissileActor = Spawn (type, pos, ALLOW_REPLACE);
|
||||
|
||||
if (MissileActor == nullptr) return nullptr;
|
||||
if (pMissileActor) *pMissileActor = MissileActor;
|
||||
P_PlaySpawnSound(MissileActor, source);
|
||||
MissileActor->target = source;
|
||||
|
|
Loading…
Reference in a new issue