Fix for STR#3079 (cont'd).

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10146 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2014-05-04 14:04:52 +00:00
parent 1882f90a94
commit b6703eb58f

View File

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