Fix for STR #3503 - handle Fl_Menu_ deleted while its menu window runs.

This commit is contained in:
ManoloFLTK 2019-02-05 18:44:09 +01:00
parent 8e78e53a85
commit 7ce74b42a0

View File

@ -987,7 +987,7 @@ const Fl_Menu_Item* Fl_Menu_Item::pulldown(
}
}
}
const Fl_Menu_Item* m = pp.current_item;
const Fl_Menu_Item* m = (pbutton && wp.deleted()) ? NULL : pp.current_item;
delete pp.fakemenu;
while (pp.nummenus>1) delete pp.p[--pp.nummenus];
mw.hide();