Merge pull request #7265 from pchote/fix-lag-crash

Fix a race condition in the map download code.
This commit is contained in:
Oliver Brakmann
2015-01-05 18:44:13 +01:00

View File

@@ -137,7 +137,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
var retry = progress.GetOrNull<ButtonWidget>("MAP_RETRY"); var retry = progress.GetOrNull<ButtonWidget>("MAP_RETRY");
if (retry != null) if (retry != null)
{ {
retry.IsVisible = () => lobby.Map.Status == MapStatus.DownloadError || lobby.Map.Status == MapStatus.Unavailable; retry.IsVisible = () => (lobby.Map.Status == MapStatus.DownloadError || lobby.Map.Status == MapStatus.Unavailable) && lobby.Map != MapCache.UnknownMap;
retry.OnClick = () => retry.OnClick = () =>
{ {
if (lobby.Map.Status == MapStatus.DownloadError) if (lobby.Map.Status == MapStatus.DownloadError)