Skip to content

Commit 2bb9b2c

Browse files
committed
fix: Ensure container exists when checking if a specific rider is free to exit
1 parent 90afd63 commit 2bb9b2c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Generals/Code/GameEngine/Source/GameLogic/Object/Contain/TransportContain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ Bool TransportContain::isSpecificRiderFreeToExit(Object* specificObject)
460460
// TheSuperHackers @bugfix Stubbjax 02/03/2026 If our parent container is held, then we
461461
// are not free to exit.
462462
DEBUG_ASSERTCRASH(specificObject->getContainedBy(), ("rider must be contained"));
463-
if (specificObject->getContainedBy()->isDisabledByType(DISABLED_HELD))
463+
if (specificObject->getContainedBy() && specificObject->getContainedBy()->isDisabledByType(DISABLED_HELD))
464464
return FALSE;
465465
#endif
466466

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/TransportContain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ Bool TransportContain::isSpecificRiderFreeToExit(Object* specificObject)
571571
// TheSuperHackers @bugfix Stubbjax 02/03/2026 If our parent container is held, then we
572572
// are not free to exit.
573573
DEBUG_ASSERTCRASH(specificObject->getContainedBy(), ("rider must be contained"));
574-
if (specificObject->getContainedBy()->isDisabledByType(DISABLED_HELD))
574+
if (specificObject->getContainedBy() && specificObject->getContainedBy()->isDisabledByType(DISABLED_HELD))
575575
return FALSE;
576576
#endif
577577

0 commit comments

Comments
 (0)