From 9ea0d4ccbce4b0efd7db5368a4382bb992c64e13 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Tue, 11 Dec 2018 11:50:07 +0100 Subject: [PATCH] Quick fix: menu disappearing (STR #3503 continued) Quick fix to repair a case when Fl_Menu_Item::pulldown() was called with only five arguments (argument pbutton == null) as discussed here: https://github.com/fltk/fltk/commit/d87ac9b59783dec5628e7ae242b390cf5097b77a#comments --- src/Fl_Menu.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx index b3e1f5c65..b51b4e040 100644 --- a/src/Fl_Menu.cxx +++ b/src/Fl_Menu.cxx @@ -925,7 +925,7 @@ const Fl_Menu_Item* Fl_Menu_Item::pulldown( { const Fl_Menu_Item* oldi = pp.current_item; Fl::wait(); - if (wp.deleted()) // menu widget has been deleted (STR #3503) + if (pbutton && wp.deleted()) // menu widget has been deleted (STR #3503) break; if (pp.state == DONE_STATE) break; // done. if (pp.current_item == oldi) continue;