Making sure the window ptr is not null
This commit is contained in:
parent
23ddfc4426
commit
eb2bfdfce1
1 changed files with 4 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue