File tree Expand file tree Collapse file tree
GeneralsMD/Code/GameEngine/Source/GameClient
Generals/Code/GameEngine/Source/GameClient Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5823,16 +5823,11 @@ void InGameUI::resetIdleWorker()
58235823void InGameUI::recreateControlBar ()
58245824{
58255825 GameWindow *parent = TheWindowManager->winGetWindowFromId (nullptr , TheNameKeyGenerator->nameToKey (" ControlBar.wnd:ControlBarParent" ));
5826- if (!parent)
5827- {
5828- return ;
5829- }
5830- Bool wasVisible = !parent->winIsHidden ();
5826+ Bool wasVisible = (parent && !parent->winIsHidden ());
58315827
5832- GameWindow *win = TheWindowManager->winGetWindowFromId (nullptr , TheNameKeyGenerator->nameToKey (" ControlBar.wnd:ControlBarParent" ));
5833- if (win)
5828+ if (parent)
58345829 {
5835- TheWindowManager->winDestroy (win );
5830+ TheWindowManager->winDestroy (parent );
58365831 }
58375832
58385833 m_idleWorkerWin = nullptr ;
@@ -5853,6 +5848,10 @@ void InGameUI::recreateControlBar()
58535848 {
58545849 ShowControlBar (TRUE );
58555850 }
5851+ else
5852+ {
5853+ HideControlBar (TRUE );
5854+ }
58565855}
58575856
58585857void InGameUI::refreshCustomUiResources ()
Original file line number Diff line number Diff line change @@ -5996,16 +5996,11 @@ void InGameUI::resetIdleWorker()
59965996void InGameUI::recreateControlBar ()
59975997{
59985998 GameWindow *parent = TheWindowManager->winGetWindowFromId (nullptr , TheNameKeyGenerator->nameToKey (" ControlBar.wnd:ControlBarParent" ));
5999- if (!parent)
6000- {
6001- return ;
6002- }
6003- Bool wasVisible = !parent->winIsHidden ();
5999+ Bool wasVisible = (parent && !parent->winIsHidden ());
60046000
6005- GameWindow *win = TheWindowManager->winGetWindowFromId (nullptr , TheNameKeyGenerator->nameToKey (" ControlBar.wnd:ControlBarParent" ));
6006- if (win)
6001+ if (parent)
60076002 {
6008- TheWindowManager->winDestroy (win );
6003+ TheWindowManager->winDestroy (parent );
60096004 }
60106005
60116006 m_idleWorkerWin = nullptr ;
@@ -6026,6 +6021,10 @@ void InGameUI::recreateControlBar()
60266021 {
60276022 ShowControlBar (TRUE );
60286023 }
6024+ else
6025+ {
6026+ HideControlBar (TRUE );
6027+ }
60296028}
60306029
60316030void InGameUI::refreshCustomUiResources ()
You can’t perform that action at this time.
0 commit comments