Check pointer before accessing it

Not the other way around.
This commit is contained in:
dhewg 2011-12-10 20:02:07 +01:00
parent a8b1d3a364
commit 4378246a3a

View file

@ -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] ) {