Fix potential NULL pointer dereference
... as reported in thread "Windows 11 crash (still investigating)" of fltk.coredev, started on Apr 24, 2024. This bug could only be triggered if a /subwindow/ wss hidden but was not limited to Windows.
This commit is contained in:
parent
8664fde1d9
commit
b402b6a839
@ -592,8 +592,9 @@ int Fl_Window::handle(int ev)
|
||||
// unmap because when the parent window is remapped we don't
|
||||
// want to reappear.
|
||||
if (visible()) {
|
||||
Fl_Widget* p = parent(); for (;p->visible();p = p->parent()) {}
|
||||
if (p->type() >= FL_WINDOW) break; // don't do the unmap
|
||||
Fl_Widget* p = parent();
|
||||
for (; p && p->visible(); p = p->parent()) { /* empty*/ }
|
||||
if (p && p->as_window()) break; // don't do the unmap
|
||||
}
|
||||
pWindowDriver->unmap();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user