FizzyApple12 / BeatSaberPresence

A mod for Beat Saber that adds Discord Rich Presence functionality.
56 stars 9 forks source link

Breaking if user doesn't have Discord open #5

Closed Zingabopp closed 3 years ago

Zingabopp commented 3 years ago

When Discord isn't open, DiscordCore.DiscordClient.GetUserManager() return null, which is throwing a NullReferenceException in PresenceController.Initialize(). This is called by Zenject which may be breaking other things that use Zenject. You'll have to adjust and thoroughly test the case where someone doesn't have Discord open when the game is launched. Probably would be best to condition adding your installers on a non-null UserManager (but also test and handle Discord being closed while the game is running).

FizzyApple12 commented 3 years ago

Just released v3.0.2 which should fix this issue.