diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-05-20 17:53:26 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-05-20 17:53:26 +0000 |
| commit | 9a7fb54d465c3ba3c0fdefdd3f804a7954a0c185 (patch) | |
| tree | 7c9e6d2d9476d0afda9ddb70d55763c280d00efa /src | |
| parent | b31a225083a59d3ec8869b29aed48140322ef8e2 (diff) | |
Fix show of subwindow causing crash (STR #23)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2987 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_mac.cxx | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/Fl_mac.cxx b/src/Fl_mac.cxx index 64e5f0ff7..bae360286 100644 --- a/src/Fl_mac.cxx +++ b/src/Fl_mac.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_mac.cxx,v 1.1.2.38 2003/01/30 21:43:07 easysw Exp $" +// "$Id: Fl_mac.cxx,v 1.1.2.39 2003/05/20 17:53:26 easysw Exp $" // // MacOS specific code for the Fast Light Tool Kit (FLTK). // @@ -1376,17 +1376,19 @@ void Fl_X::make(Fl_Window* w) x->cursor = fl_default_cursor; Fl_Window *win = w->window(); Fl_X *xo = Fl_X::i(win); - x->xidNext = xo->xidChildren; - x->xidChildren = 0L; - xo->xidChildren = x; - x->xid = fl_xid(win); - x->w = w; w->i = x; - x->wait_for_expose = 0; - x->next = Fl_X::first; // must be in the list for ::flush() - Fl_X::first = x; w->set_visible(); - w->handle(FL_SHOW); - w->redraw(); // force draw to happen + if (xo) { + x->xidNext = xo->xidChildren; + x->xidChildren = 0L; + xo->xidChildren = x; + x->xid = fl_xid(win); + x->w = w; w->i = x; + x->wait_for_expose = 0; + x->next = Fl_X::first; // must be in the list for ::flush() + Fl_X::first = x; + w->handle(FL_SHOW); + w->redraw(); // force draw to happen + } fl_show_iconic = 0; } else // create a desktop window @@ -1758,6 +1760,6 @@ void Fl::paste(Fl_Widget &receiver, int clipboard) { // -// End of "$Id: Fl_mac.cxx,v 1.1.2.38 2003/01/30 21:43:07 easysw Exp $". +// End of "$Id: Fl_mac.cxx,v 1.1.2.39 2003/05/20 17:53:26 easysw Exp $". // |
