mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-12 08:08:02 +00:00
engine: server: fix possible null pointer dereference
This commit is contained in:
parent
2f2890cd11
commit
862b9e68be
@ -545,7 +545,7 @@ void SV_FreeOldEntities( void )
|
||||
}
|
||||
|
||||
// decrement svgame.numEntities if the highest number entities died
|
||||
for( ; EDICT_NUM( svgame.numEntities - 1 )->free; svgame.numEntities-- );
|
||||
for( ; ( ent = EDICT_NUM( svgame.numEntities - 1 )) && ent->free; svgame.numEntities-- );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1842,8 +1842,10 @@ void SV_Physics( void )
|
||||
// increase framecount
|
||||
sv.framecount++;
|
||||
|
||||
#if 0 // figure out why this causes memory corruption
|
||||
// decrement svgame.numEntities if the highest number entities died
|
||||
for( ; EDICT_NUM( svgame.numEntities - 1 )->free; svgame.numEntities-- );
|
||||
for( ; ( ent = EDICT_NUM( svgame.numEntities - 1 )) && ent->free; svgame.numEntities-- );
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user