Page MenuHome

Fix T92265: Outliner crash clicking override warning buttons
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Oct 19 2021, 10:24 AM.

Details

Summary

outliner_draw_overrides_buts uses uiDefIconBlockBut but doing so
without defining a function callback to actually build a block.
This will make the button go down the route of spawning a popup, but
without a menu. Crash then happens later accesing the (missing) menu in
ui_handler_region_menu.

So while we could dive into making this usage failsafe (carefully
checking BUTTON_STATE_MENU_OPEN in combination with
uiHandleButtonData->menu being NULL all over), but it seems much more
straightforward to just use uiDefIconBut (instead of
uiDefIconBlockBut) since this Override Warning buttons seem not to
intend spawning a menu anyways?

Diff Detail

Repository
rB Blender