From c754da6491e90b5d736dea1e57fac03dfd86fdd1 Mon Sep 17 00:00:00 2001 From: Silent Date: Mon, 18 Nov 2019 21:46:51 +0100 Subject: [PATCH] Do not assert in Discord::Shutdown Discord::Shutdown runs on app exit unconditionally, and thus it's valid to try to call it even when Discord RPC is not running. --- UI/DiscordIntegration.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/UI/DiscordIntegration.cpp b/UI/DiscordIntegration.cpp index 442a14b763..5c49340c7e 100644 --- a/UI/DiscordIntegration.cpp +++ b/UI/DiscordIntegration.cpp @@ -64,11 +64,12 @@ void Discord::Init() { } void Discord::Shutdown() { - assert(initialized_); + if (initialized_) { #ifdef ENABLE_DISCORD - Discord_Shutdown(); + Discord_Shutdown(); #endif - initialized_ = false; + initialized_ = false; + } } void Discord::Update() {