summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2005-01-04 15:02:57 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2005-01-04 15:02:57 +0000
commitfa7293b3cfc0d0a1b57a816c808b84b72b277972 (patch)
treee4288f423e8e9fd8e614ebffd3cbaa5907d0cb8e
parent1bc50aa780c6f7efd07756dc03a948ce8e536e15 (diff)
Fix menu crash bug (STR #685)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3959 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CHANGES7
-rw-r--r--src/Fl_Menu.cxx6
2 files changed, 8 insertions, 5 deletions
diff --git a/CHANGES b/CHANGES
index 1c69c7ce0..a5279d3fe 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,7 +1,10 @@
CHANGES IN FLTK 1.1.7
- - Fl_Double_Window would cause a full redraw, even if only
- small parts of the UI were changed on Mac OS X.
+ - Fl_Menu::popup() and ::pulldown() would crash an
+ application if a callback created widgets before they
+ returned (STR #685)
+ - Fl_Double_Window would cause a full redraw, even if
+ only small parts of the UI were changed on Mac OS X.
- Fl_JPEG_Image did not correctly handle errors reported
by the JPEG library (STR #652)
- Fl_Menu now draws sub-menu arrows like other toolkits
diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx
index b3a2ee71a..23c09c0f4 100644
--- a/src/Fl_Menu.cxx
+++ b/src/Fl_Menu.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Menu.cxx,v 1.18.2.12.2.36 2004/12/14 13:49:55 easysw Exp $"
+// "$Id: Fl_Menu.cxx,v 1.18.2.12.2.37 2005/01/04 15:02:57 easysw Exp $"
//
// Menu code for the Fast Light Tool Kit (FLTK).
//
@@ -774,10 +774,10 @@ const Fl_Menu_Item* Fl_Menu_Item::pulldown(
}
}
const Fl_Menu_Item* m = pp.current_item;
+ Fl::release();
delete fakemenu;
while (pp.nummenus>1) delete pp.p[--pp.nummenus];
mw.hide();
- Fl::release();
return m;
}
@@ -832,5 +832,5 @@ const Fl_Menu_Item* Fl_Menu_Item::test_shortcut() const {
}
//
-// End of "$Id: Fl_Menu.cxx,v 1.18.2.12.2.36 2004/12/14 13:49:55 easysw Exp $".
+// End of "$Id: Fl_Menu.cxx,v 1.18.2.12.2.37 2005/01/04 15:02:57 easysw Exp $".
//