From cd2fe18140edb2fc3441ad4d3e46cd9b1e563795 Mon Sep 17 00:00:00 2001 From: KuleRucket <737724+KuleRucket@users.noreply.github.com> Date: Thu, 30 Mar 2023 14:06:19 +0200 Subject: [PATCH] Hotfix - keep platform guard in scope (#1104) Co-authored-by: KuleRucket --- src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index da5139e1..941dcfc1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -348,7 +348,9 @@ main(int argc, char *argv[]) { // If any of the following fail, we log an error and continue event though sunshine will not function correctly. // This allows access to the UI to fix configuration problems or view the logs. - if (!platf::init()) { + + auto deinit_guard = platf::init(); + if (!deinit_guard) { BOOST_LOG(error) << "Platform failed to initialize"sv; }