Fix #119778: Crash in popovers that do not support refreshing #119796

Merged
Jacques Lucke merged 1 commits from guishe/blender:fix-popover-crash into main 2024-03-22 17:09:12 +01:00
1 changed files with 3 additions and 2 deletions

View File

@ -6144,8 +6144,9 @@ static void ui_paneltype_draw_impl(bContext *C, PanelType *pt, uiLayout *layout,
ui_block_add_dynamic_listener(block, pt->listener);
}
/* This check may be paranoid, this function might run outside the context of a popup. */
if (block->handle) {
/* This check may be paranoid, this function might run outside the context of a popup or can run
* in popopers that are not supposed to support refreshing, see #ui_popover_create_block. */
if (block->handle && block->handle->region) {
/* Allow popovers to contain collapsible sections, see #uiItemPopoverPanel. */
UI_popup_dummy_panel_set(block->handle->region, block);
}