Skip to content

Commit

Permalink
fix crash when discord rich presence disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
insomniachi committed Apr 30, 2023
1 parent 313e588 commit 497a342
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ public DiscordRichPresenseUpdater(IDiscordRichPresense discordRichPresense,
protected override void OnDurationChanged(TimeSpan duration)
{
_duration = duration;

if (!_settings.UseDiscordRichPresense)
{
return;
}

_discordRichPresense.UpdateTimer(_duration - _currentTime);
}

Expand Down

0 comments on commit 497a342

Please sign in to comment.