1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 19:03:08 +08:00

Prevent potential threading issues

This commit is contained in:
jvyden 2024-03-19 16:02:06 -04:00
parent f851716a47
commit 808d6e0943
No known key found for this signature in database
GPG Key ID: 18BCF2BE0262B278

View File

@ -97,11 +97,13 @@ namespace osu.Desktop
private void onReady(object _, ReadyMessage __) private void onReady(object _, ReadyMessage __)
{ {
Logger.Log("Discord RPC Client ready.", LoggingTarget.Network, LogLevel.Debug); Logger.Log("Discord RPC Client ready.", LoggingTarget.Network, LogLevel.Debug);
updateStatus(); Schedule(updateStatus);
} }
private void updateStatus() private void updateStatus()
{ {
Debug.Assert(ThreadSafety.IsUpdateThread);
if (!client.IsInitialized) if (!client.IsInitialized)
return; return;