Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@

// save off selection
Int selectedIndex = -1;
Int indexToSelect = -1;

Check failure on line 982 in GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/LobbyUtils.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / win32+e

'indexToSelect': local variable is initialized but not referenced

Check failure on line 982 in GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/LobbyUtils.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / win32-debug+e

'indexToSelect': local variable is initialized but not referenced

Check failure on line 982 in GeneralsMD/Code/GameEngine/Source/GameNetwork/GameSpy/LobbyUtils.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / win32-profile+e

'indexToSelect': local variable is initialized but not referenced
Int selectedID = 0;
GadgetListBoxGetSelected(win, &selectedIndex);
if (selectedIndex != -1 )
Expand Down Expand Up @@ -1066,17 +1066,10 @@
}
*/

clearBuddyGames();

// restore selection
GadgetListBoxSetSelected(win, indexToSelect); // even for -1, so we can disable the 'Join Game' button
// if(prevPos > 10)
GadgetListBoxSetTopVisibleEntry( win, prevPos );//+ 1

if (indexToSelect < 0 && selectedID)
{
TheWindowManager->winSetLoneWindow(NULL);
}
// Note: clearBuddyGames(), GadgetListBoxSetSelected(), and GadgetListBoxSetTopVisibleEntry()
// are now handled inside the SearchForLobbies callback above (after async operation completes).
// The code below was removed to fix a race condition where these operations executed on the
// empty/reset listbox before the async callback populated it, causing crashes.
}

void RefreshGameInfoListBox( GameWindow *mainWin, GameWindow *win )
Expand Down
Loading