Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/editors/interface/interface_layout.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 6267681bb4d..bd42e5db531 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -5169,8 +5169,14 @@ bool UI_block_apply_search_filter(uiBlock *block, const char *search_filter)
return false;
}
- if (block->panel && block->panel->type && block->panel->type->flag & PANEL_TYPE_NO_SEARCH) {
- return false;
+ Panel *panel = block->panel;
+
+ if (panel != NULL && panel->type->flag & PANEL_TYPE_NO_SEARCH) {
+ /* Panels for active blocks should always have a type, otherwise they wouldn't be created. */
+ BLI_assert(block->panel->type != NULL);
+ if (panel->type->flag & PANEL_TYPE_NO_SEARCH) {
+ return false;
+ }
}
const bool panel_label_matches = block_search_panel_label_matches(block, search_filter);
@@ -5179,7 +5185,7 @@ bool UI_block_apply_search_filter(uiBlock *block, const char *search_filter)
true :
block_search_filter_tag_buttons(block, search_filter);
- if (block->panel != NULL) {
+ if (panel != NULL) {
if (has_result) {
ui_panel_tag_search_filter_match(block->panel);
}