You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
+21-9Lines changed: 21 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -179,11 +179,14 @@ void ControlBar::populatePurchaseScience( Player* player )
179
179
commandSet8 = TheControlBar->findCommandSet(player->getPlayerTemplate()->getPurchaseScienceCommandSetRank8()); // TEMP WILL CHANGE TO PROPER WAY ONCE WORKING
180
180
181
181
for( i = 0; i < MAX_PURCHASE_SCIENCE_RANK_1; i++ )
182
-
m_sciencePurchaseWindowsRank1[i]->winHide(TRUE);
182
+
if (m_sciencePurchaseWindowsRank1[i]!=nullptr)
183
+
m_sciencePurchaseWindowsRank1[i]->winHide(TRUE);
183
184
for( i = 0; i < MAX_PURCHASE_SCIENCE_RANK_3; i++ )
184
-
m_sciencePurchaseWindowsRank3[i]->winHide(TRUE);
185
+
if (m_sciencePurchaseWindowsRank3[i] != nullptr)
186
+
m_sciencePurchaseWindowsRank3[i]->winHide(TRUE);
185
187
for( i = 0; i < MAX_PURCHASE_SCIENCE_RANK_8; i++ )
186
-
m_sciencePurchaseWindowsRank8[i]->winHide(TRUE);
188
+
if (m_sciencePurchaseWindowsRank8[i] != nullptr)
189
+
m_sciencePurchaseWindowsRank8[i]->winHide(TRUE);
187
190
188
191
189
192
// if no command set match is found hide all the buttons
@@ -204,7 +207,8 @@ void ControlBar::populatePurchaseScience( Player* player )
0 commit comments