Skip to content

Commit 8e6674a

Browse files
committed
Always clear out games dropdown before adding games list
1 parent 24dd0e9 commit 8e6674a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Refresher/UI/PipelineForm.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,15 @@ await Application.Instance.InvokeAsync(() =>
287287

288288
private void HandleGameList(List<GameInformation> games)
289289
{
290+
Debug.Assert(this._gamesDropDown != null);
291+
290292
if (this._connectButton != null)
291293
{
292294
this._connectButton.Enabled = false;
293295
this._connectButton.Text = "Connected!";
294296
}
297+
298+
this._gamesDropDown.Items.Clear();
295299

296300
foreach (GameInformation game in games)
297301
{
@@ -329,10 +333,10 @@ private void HandleGameList(List<GameInformation> games)
329333
}
330334
}
331335

332-
this._gamesDropDown!.Items.Add(item);
336+
this._gamesDropDown.Items.Add(item);
333337
}
334338

335-
this._gamesDropDown!.Enabled = true;
339+
this._gamesDropDown.Enabled = true;
336340
}
337341

338342
private void OnAutoDiscoverClick(object? sender, EventArgs e)

0 commit comments

Comments
 (0)