From 4fe60fdec4bc8567668870793c3fdaa24f6814b7 Mon Sep 17 00:00:00 2001 From: "seer-by-sentry[bot]" <157164994+seer-by-sentry[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2026 16:10:47 +0000 Subject: [PATCH] Fix crash when special power template is null --- .../GameClient/GUI/ControlBar/ControlBarCommandProcessing.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommandProcessing.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommandProcessing.cpp index 487c922a938..7492ff089b5 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommandProcessing.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommandProcessing.cpp @@ -839,6 +839,8 @@ CBCommandStatus ControlBar::processCommandUI( GameWindow *control, case GUI_COMMAND_SPECIAL_POWER_FROM_SHORTCUT: { const SpecialPowerTemplate *spTemplate = commandButton->getSpecialPowerTemplate(); + if( !spTemplate ) + break; SpecialPowerType spType = spTemplate->getSpecialPowerType(); Object* obj = ThePlayerList->getLocalPlayer()->findMostReadyShortcutSpecialPowerOfType( spType );