diff options
| author | Manolo Gouy <Manolo> | 2011-04-11 20:10:02 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2011-04-11 20:10:02 +0000 |
| commit | 87b998ed1f7664a508e4c8906635a7b512b5168a (patch) | |
| tree | c4b98553bcf8eea166bd8e8ef46c9434fa6c82ff /src | |
| parent | 8d084cb4bc5830e566dc516f6a85a4262a464fda (diff) | |
Fixed crash on Mac OS when Fl::focus() called before show().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8577 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index f3d62b9c2..dbde5010c 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -847,7 +847,10 @@ void Fl::focus(Fl_Widget *o) { while (w1) { win=w1; w1=win->window(); } if (win) { #ifdef __APPLE__ - if (fl_xfocus != win) Fl_X::i(win)->set_key_window(); + if (fl_xfocus != win) { + Fl_X *x = Fl_X::i(win); + if (x) x->set_key_window(); + } #endif fl_xfocus = win; } |
