-
-
Notifications
You must be signed in to change notification settings - Fork 113
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When calling ClearPresence on an active client. An error is logged. This is definitely a bug. Interestingly, the rich presence status is successfully cleared from Discord despite this error.
To Reproduce
Steps to reproduce the behavior:
- Set a presence with
client.SetPresence(new RichPresence(){})
- Clear this presence with
client.ClearPresence()
- Observe the discord status clearing but an error also being logged
This error only seems to happen if there's an existing presence. If one was never set, ClearPresence
. Also, if one was cleared already, calling ClearPresence
again doesn't log the error a second time.
Expected behavior
The status is cleared but without logging an error.
Desktop:
- OS: Windows 10
- Framework: .NET 5.0 (this is dotnet core, they just changed the name)
- nuget Version: 1.0.175
Additional context
In case it matters, it's worth noting that my project is using the null safety feature of C# by having <Nullable>enable</Nullable>
inside of the main PropertyGroup
of the .csproj file.
Logs
2021-08-28 23:27:57,385 [Discord IPC Thread] ERROR - Unhandled Exception while processing event: System.NullReferenceException
2021-08-28 23:27:57,387 [Discord IPC Thread] ERROR - Object reference not set to an instance of an object.
2021-08-28 23:27:57,387 [Discord IPC Thread] ERROR - at DiscordRPC.RichPresence.Merge(BaseRichPresence presence)
at DiscordRPC.DiscordRpcClient.ProcessMessage(IMessage message)
at DiscordRPC.DiscordRpcClient.<.ctor>b__103_0(Object sender, IMessage msg)
at DiscordRPC.RPC.RpcConnection.EnqueueMessage(IMessage message)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working