From 676d331ba901a27aa3a2992dade3d3124da5eb0e Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Mon, 11 May 2026 02:22:56 +0100 Subject: [PATCH] fix: building without the system tray enabled (#5092) --- src/main.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index a31818ba8..13df67840 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -310,7 +310,10 @@ int main(int argc, char *argv[]) { // Break out of the main loop shutdown_event->raise(true); - system_tray::end_tray(); + + if (tray_is_enabled && config::sunshine.system_tray) { + system_tray::end_tray(); + } display_device_deinit_guard = nullptr; }); @@ -327,7 +330,10 @@ int main(int argc, char *argv[]) { // Break out of the main loop shutdown_event->raise(true); - system_tray::end_tray(); + + if (tray_is_enabled && config::sunshine.system_tray) { + system_tray::end_tray(); + } display_device_deinit_guard = nullptr; });