mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-23 12:53:09 +00:00
Check pointer before accessing it
Not the other way around.
This commit is contained in:
parent
a8b1d3a364
commit
4378246a3a
1 changed files with 3 additions and 3 deletions
|
@ -1418,13 +1418,13 @@ void idBrushBSP::FloodThroughPortals_r( idBrushBSPNode *node, int contents, int
|
|||
idBrushBSPPortal *p;
|
||||
int s;
|
||||
|
||||
if ( node->occupied ) {
|
||||
common->Error( "FloodThroughPortals_r: node already occupied\n" );
|
||||
}
|
||||
if ( !node ) {
|
||||
common->Error( "FloodThroughPortals_r: NULL node\n" );
|
||||
}
|
||||
|
||||
if ( node->occupied ) {
|
||||
common->Error( "FloodThroughPortals_r: node already occupied\n" );
|
||||
}
|
||||
node->occupied = depth;
|
||||
|
||||
for ( p = node->portals; p; p = p->next[s] ) {
|
||||
|
|
Loading…
Reference in a new issue