mirror of https://github.com/OpenTTD/OpenTTD.git
Fix: [Network] don't rebuild the host-list during iterating the list (#9240)
Additionally, only rebuild it when we added a new manual server, as otherwise it is a noop anyway.
This commit is contained in:
parent
9841ebb0bd
commit
9e7e87ce3e
|
@ -701,7 +701,6 @@ NetworkGameList *NetworkAddServer(const std::string &connection_string, bool man
|
|||
ClearGRFConfigList(&item->info.grfconfig);
|
||||
item->info.server_name = connection_string;
|
||||
|
||||
NetworkRebuildHostList();
|
||||
UpdateNetworkGameWindow();
|
||||
|
||||
NetworkQueryServer(connection_string);
|
||||
|
|
|
@ -830,6 +830,7 @@ public:
|
|||
if (!StrEmpty(str)) {
|
||||
strecpy(_settings_client.network.connect_to_ip, str, lastof(_settings_client.network.connect_to_ip));
|
||||
NetworkAddServer(str);
|
||||
NetworkRebuildHostList();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue