Fixed crash when setting a filter while the game is refreshing the server list

This commit is contained in:
juanjp600
2017-12-03 20:33:20 -03:00
parent f8e5a4f7ab
commit 4a1eea8c30
3 changed files with 25 additions and 48 deletions
@@ -124,9 +124,10 @@ namespace Barotrauma
private void FilterServers()
{
serverList.RemoveChild(serverList.FindChild("noresults"));
foreach (GUIComponent child in serverList.children)
{
if (!(child.UserData is ServerInfo)) continue;
ServerInfo serverInfo = (ServerInfo)child.UserData;
child.Visible =