Fix a subtle bug in Fl_Menu_::menu_end()
This bug could cause memory allocation/free errors and eventually cause a crash.
This commit is contained in:
parent
ef1c937606
commit
a7c9fd88b3
@ -522,8 +522,8 @@ const Fl_Menu_Item *Fl_Menu_::menu_end() {
|
||||
memcpy(newMenu, local_array, n * sizeof(Fl_Menu_Item));
|
||||
if (value_)
|
||||
value_ = newMenu + value_offset;
|
||||
fl_menu_array_owner = 0;
|
||||
}
|
||||
fl_menu_array_owner = 0;
|
||||
return menu_;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user