diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2011-11-28 12:32:56 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2011-11-28 12:32:56 +0000 |
| commit | 05f669c9cef365de7a0bb5f79c6a1efc8f255a2f (patch) | |
| tree | e3dcce06556f0862fe4cfccab6d6ab11f0f4f8c1 /src | |
| parent | a1a9dbd961ac59bf4c49ce7f2ab478b8323d8d86 (diff) | |
Fixed a potential crash if Fl_Double_Window::flush() was called before show().
Thanks to Mathieu Peyrega for the patch in fltk.general [1] on Nov 14, 2011,
although I implemented it differently.
[1] http://www.fltk.org/newsgroups.php?gfltk.general+v:33946
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9188 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Double_Window.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Fl_Double_Window.cxx b/src/Fl_Double_Window.cxx index 61a9e8f1f..e363c793e 100644 --- a/src/Fl_Double_Window.cxx +++ b/src/Fl_Double_Window.cxx @@ -326,6 +326,7 @@ void Fl_Double_Window::flush() {flush(0);} void Fl_Double_Window::flush(int eraseoverlay) { make_current(); // make sure fl_gc is non-zero Fl_X *myi = Fl_X::i(this); + if (!myi) return; // window not yet created if (!myi->other_xid) { #if USE_XDBE if (can_xdbe()) { |
