Author: AlbrechtS
Date: 2011-11-28 04:32:56 -0800 (Mon, 28 Nov 2011)
New Revision: 9188
Log:
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
Modified:
branches/branch-1.3/CHANGES
branches/branch-1.3/src/Fl_Double_Window.cxx
Modified: branches/branch-1.3/CHANGES
===================================================================
--- branches/branch-1.3/CHANGES 2011-11-23 18:06:38 UTC (rev 9187)
+++ branches/branch-1.3/CHANGES 2011-11-28 12:32:56 UTC (rev 9188)
@@ -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)
Modified: branches/branch-1.3/src/Fl_Double_Window.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Double_Window.cxx 2011-11-23 18:06:38 UTC
(rev 9187)
+++ branches/branch-1.3/src/Fl_Double_Window.cxx 2011-11-28 12:32:56 UTC
(rev 9188)
@@ -326,6 +326,7 @@
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()) {
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit