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)
This commit is contained in:
Albrecht Schlosser 2018-12-11 11:50:07 +01:00 committed by GitHub
parent 7458281545
commit 9ea0d4ccbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;