From 9242d5f932744e01642c526ea737db612b0d446d Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 17 Mar 2004 01:55:02 +0000 Subject: [PATCH] fix close window bug --- panda/src/framework/pandaFramework.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panda/src/framework/pandaFramework.cxx b/panda/src/framework/pandaFramework.cxx index 6bd8d854d9..74facc173b 100644 --- a/panda/src/framework/pandaFramework.cxx +++ b/panda/src/framework/pandaFramework.cxx @@ -835,7 +835,7 @@ event_esc(CPT_Event event, void *data) { self->remove_mouse(win); // If we closed the last window, shut down. - if (self->_windows.empty()) { + if (self->all_windows_closed()) { self->_exit_flag = true; } } @@ -1307,7 +1307,7 @@ event_window_event(CPT_Event event, void *data) { self->remove_mouse(win); // If the last window was closed, exit the application. - if (self->_windows.empty() && !self->_exit_flag) { + if (self->all_windows_closed() && !self->_exit_flag) { framework_cat.info() << "Last window was closed by user.\n"; self->_exit_flag = true;