Removing sub menu causes crash
Original Reporter info from Mantis: mftq75
-
Reporter name: C Western
Original Reporter info from Mantis: mftq75
- Reporter name: C Western
Description:
Under gtk2, if a popup menu is dynamically updated to remove a submenu using Clear on the menu item, a crash occurs (Object reference is nil). Debugging suggests the issue is with the MenuItem.Clear call, which does not fully update the associated menu structures. (I think MergedMenuItems needs to be cleared.) The attached patch fixes this for me, by calling Delete on each menu item, rather than simply emptying the list.