From c7f3a599c98f49e821e5790a436ff508e90ce097 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Sat, 13 Apr 2024 13:17:06 +0900 Subject: [PATCH] Fix crash when entering multiplayer on macOS --- osu.Desktop/DiscordRichPresence.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Desktop/DiscordRichPresence.cs b/osu.Desktop/DiscordRichPresence.cs index ed9d4ca2d214..f1c796d0cd0b 100644 --- a/osu.Desktop/DiscordRichPresence.cs +++ b/osu.Desktop/DiscordRichPresence.cs @@ -205,7 +205,9 @@ private void updatePresence(bool hideIdentifiableInformation) Password = room.Settings.Password, }; - presence.Secrets.JoinSecret = JsonConvert.SerializeObject(roomSecret); + if (client.HasRegisteredUriScheme) + presence.Secrets.JoinSecret = JsonConvert.SerializeObject(roomSecret); + // discord cannot handle both secrets and buttons at the same time, so we need to choose something. // the multiplayer room seems more important. presence.Buttons = null;