summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--src/Fl_Double_Window.cxx1
2 files changed, 3 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index c9a402c50..0c6cecb21 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
CHANGES IN FLTK 1.3.1
+ - Fixed a potential crash if Fl_Double_Window::flush() was called
+ before show()
- Fixed regression (in FLTK 1.3.0) that could clear a radio
button by using the keyboard (space or shortcut) (STR #2748)
- Fixed fl_pie() drawing too small on X11 (STR #2703)
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()) {