From b6703eb58fa23516e4d7b7298481e24cb0d2a596 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sun, 4 May 2014 14:04:52 +0000 Subject: Fix for STR#3079 (cont'd). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10146 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Fl.cxx b/src/Fl.cxx index 91376fdcf..b49425d38 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1429,7 +1429,7 @@ void Fl_Window::hide() { // when hiding a window, build list of windows it owns, and do hide/show on them. int count = 0; Fl_Window *win, **doit = NULL; - for (win = Fl::first_window(); win; win = Fl::next_window(win)) { + for (win = Fl::first_window(); win && i; win = Fl::next_window(win)) { if (win->non_modal() && GetWindow(fl_xid(win), GW_OWNER) == i->xid) { count++; } @@ -1437,7 +1437,7 @@ void Fl_Window::hide() { if (count) { doit = new Fl_Window*[count]; count = 0; - for (win = Fl::first_window(); win; win = Fl::next_window(win)) { + for (win = Fl::first_window(); win && i; win = Fl::next_window(win)) { if (win->non_modal() && GetWindow(fl_xid(win), GW_OWNER) == i->xid) { doit[count++] = win; } -- cgit v1.2.3