diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp index 9d7f4cd7e72..162e3969d20 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp @@ -1808,7 +1808,9 @@ void ControlBar::evaluateContextUI() } else // get the first and only drawble in the selection list - drawToEvaluateFor = selectedDrawables->front(); + // TheSuperHackers @fix The first access to this can return an empty list + if (!selectedDrawables->empty()) + drawToEvaluateFor = selectedDrawables->front(); diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp index f07e61c8caf..2c3b3579b65 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp @@ -1833,7 +1833,9 @@ void ControlBar::evaluateContextUI() } else // get the first and only drawble in the selection list - drawToEvaluateFor = selectedDrawables->front(); + // TheSuperHackers @fix The first access to this can return an empty list + if (!selectedDrawables->empty()) + drawToEvaluateFor = selectedDrawables->front();