Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Generals/Code/GameEngine/Source/Common/RTS/Team.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1492,7 +1492,11 @@ Relationship Team::getRelationship(const Team *that) const
}

// nope -- go with our Player's view on the matter.
return getControllingPlayer()->getRelationship(that);
// TheSuperHackers @bugfix Mauller 16/03/2026 Guard against null controlling player to prevent access violation
const Player* controllingPlayer = getControllingPlayer();
if (controllingPlayer == nullptr)
return NEUTRAL;
return controllingPlayer->getRelationship(that);
}

// ------------------------------------------------------------------------
Expand Down
6 changes: 5 additions & 1 deletion GeneralsMD/Code/GameEngine/Source/Common/RTS/Team.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,11 @@ Relationship Team::getRelationship(const Team *that) const
}

// nope -- go with our Player's view on the matter.
return getControllingPlayer()->getRelationship(that);
// TheSuperHackers @bugfix Mauller 16/03/2026 Guard against null controlling player to prevent access violation
const Player* controllingPlayer = getControllingPlayer();
if (controllingPlayer == nullptr)
return NEUTRAL;
return controllingPlayer->getRelationship(that);
}

// ------------------------------------------------------------------------
Expand Down
Loading