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:

d87ac9b597 (comments)

Backported from 'master': 9ea0d4ccbc
This commit is contained in:
Albrecht Schlosser 2018-12-11 11:50:07 +01:00
parent 0d14e25354
commit b7d434b863

View File

@ -899,7 +899,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;