Skip to content

Commit 5247732

Browse files
authored
[ZH] Prevent dereferencing NULL pointer 'ppi' in FlightDeckBehavior::exitObjectViaDoor() (#1107)
1 parent 818680e commit 5247732

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/FlightDeckBehavior.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,17 +1318,16 @@ void FlightDeckBehavior::exitObjectViaDoor( Object *newObj, ExitDoorType exitDoo
13181318
break;
13191319
}
13201320
}
1321+
}
13211322

1322-
if (!ppi)
1323-
{
1324-
DEBUG_CRASH(("could not find the space. what?"));
1325-
return;
1326-
}
1327-
1328-
ppi->m_objectInSpace = newObj->getID();
1329-
//validateAssignments();
1323+
if (!ppi)
1324+
{
1325+
DEBUG_CRASH(("could not find the space. what?"));
1326+
return;
13301327
}
13311328

1329+
ppi->m_objectInSpace = newObj->getID();
1330+
//validateAssignments();
13321331

13331332
/// @todo srj -- this is evil. fix.
13341333
static NameKeyType jetKey = TheNameKeyGenerator->nameToKey( "JetAIUpdate" );

0 commit comments

Comments
 (0)