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
This commit is contained in:
Albrecht Schlosser
2018-12-11 11:50:07 +01:00
committed by GitHub
parent 7458281545
commit 9ea0d4ccbc
+1 -1
View File
@@ -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;