Making sure the window ptr is not null

This commit is contained in:
Pcornat 2025-01-23 21:36:03 +01:00
parent 23ddfc4426
commit eb2bfdfce1
Signed by: Pcornat
GPG key ID: E0326CC678A00BDD

View file

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