From eb2bfdfce1fd9c5ed55d58a86b7db5c0667d12ba Mon Sep 17 00:00:00 2001 From: Pcornat Date: Thu, 23 Jan 2025 21:36:03 +0100 Subject: [PATCH] Making sure the window ptr is not null --- app_win_2_back.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app_win_2_back.cpp b/app_win_2_back.cpp index ff5dac1..aa743ed 100644 --- a/app_win_2_back.cpp +++ b/app_win_2_back.cpp @@ -112,8 +112,10 @@ namespace gui_to_app { void AppWin2Back::on_quit() noexcept { auto windows = get_windows(); for (auto *window: windows) { - window->set_visible(false); - delete window; + if (window != nullptr) { + window->set_visible(false); + delete window; + } } quit(); }