Skip to content

Commit

Permalink
fix(window/linux): check if application exists before destruction
Browse files Browse the repository at this point in the history
  • Loading branch information
jwerle committed Aug 20, 2024
1 parent ea51055 commit 493fafc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/window/linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
Expand Down

0 comments on commit 493fafc

Please sign in to comment.