From 493fafcdde837f0466f761b6cc22534b6f86b025 Mon Sep 17 00:00:00 2001 From: Joseph Werle Date: Tue, 20 Aug 2024 14:44:33 +0200 Subject: [PATCH] fix(window/linux): check if application exists before destruction --- src/window/linux.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/window/linux.cc b/src/window/linux.cc index fd275599ff..91c3bae12d 100644 --- a/src/window/linux.cc +++ b/src/window/linux.cc @@ -958,7 +958,6 @@ namespace SSC { aspectWidth = std::stof(trim(parts[0])); aspectHeight = std::stof(trim(parts[1])); } catch (...) { - debug("invalid aspect ratio"); return FALSE; } @@ -979,6 +978,12 @@ namespace SSC { } Window::~Window () { + auto app = App::sharedApplication(); + + if (!app || app->shouldExit) { + return; + } + if (this->policies) { g_object_unref(this->policies); this->policies = nullptr;