1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:37:28 +08:00

Fix tournament client not loading

Caused by a `LoadComponentsAsync()` call being fired from a worker
thread, which will throw exceptions since the recent addition of safety
checks around that method.
This commit is contained in:
Bartłomiej Dach 2022-01-27 16:57:38 +01:00
parent 96f86d035d
commit 9deeaee404
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -61,18 +61,15 @@ namespace osu.Game.Tournament
loadingSpinner.Show(); loadingSpinner.Show();
BracketLoadTask.ContinueWith(t => BracketLoadTask.ContinueWith(t => Schedule(() =>
{ {
if (t.IsFaulted) if (t.IsFaulted)
{
Schedule(() =>
{ {
loadingSpinner.Hide(); loadingSpinner.Hide();
loadingSpinner.Expire(); loadingSpinner.Expire();
Logger.Error(t.Exception, "Couldn't load bracket with error"); Logger.Error(t.Exception, "Couldn't load bracket with error");
Add(new WarningBox($"Your {BRACKET_FILENAME} file could not be parsed. Please check runtime.log for more details.")); Add(new WarningBox($"Your {BRACKET_FILENAME} file could not be parsed. Please check runtime.log for more details."));
});
return; return;
} }
@ -143,7 +140,7 @@ namespace osu.Game.Tournament
windowMode.Value = WindowMode.Windowed; windowMode.Value = WindowMode.Windowed;
}), true); }), true);
}); });
}); }));
} }
} }
} }