Fix potential nulllpointer dereferences

This commit is contained in:
Yamagi Burmeister 2012-06-26 14:17:18 +02:00
parent 0226b07f48
commit 3e063fe549
3 changed files with 9 additions and 0 deletions

View File

@ -937,6 +937,9 @@ void door_use (edict_t *self, edict_t *other, edict_t *activator)
{
edict_t *ent;
if (!self)
return;
if (self->flags & FL_TEAMSLAVE)
return;

View File

@ -109,6 +109,9 @@ gitem_t *FindItem (char *pickup_name)
void DoRespawn (edict_t *ent)
{
if (!ent)
return;
if (ent->team)
{
edict_t *master;

View File

@ -687,6 +687,9 @@ void fire_rail (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick
int mask;
qboolean water;
if (!self)
return;
VectorMA (start, 8192, aimdir, end);
VectorCopy (start, from);
ignore = self;