Hotfix - keep platform guard in scope (#1104)

Co-authored-by: KuleRucket <luke.d.tucker@gmail.com>
This commit is contained in:
KuleRucket 2023-03-30 14:06:19 +02:00 committed by GitHub
parent 972f726ff9
commit cd2fe18140
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}