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:
Diffstat (limited to 'source/blender/editors/interface/interface_ops.cc')
-rw-r--r--source/blender/editors/interface/interface_ops.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_ops.cc b/source/blender/editors/interface/interface_ops.cc
index 7649c80d700..a42e08c59d5 100644
--- a/source/blender/editors/interface/interface_ops.cc
+++ b/source/blender/editors/interface/interface_ops.cc
@@ -1015,7 +1015,7 @@ static void override_idtemplate_menu_draw(const bContext *UNUSED(C), Menu *menu)
uiItemO(layout, IFACE_("Clear"), ICON_NONE, "UI_OT_override_idtemplate_clear");
}
-static void override_idtemplate_menu(void)
+static void override_idtemplate_menu()
{
MenuType *mt;
@@ -1574,8 +1574,13 @@ static bool jump_to_target_button(bContext *C, bool poll)
char *str_ptr = RNA_property_string_get_alloc(
&ptr, prop, str_buf, sizeof(str_buf), nullptr);
- int found = RNA_property_collection_lookup_string(
- &coll_search->search_ptr, coll_search->search_prop, str_ptr, &target_ptr);
+ int found = 0;
+ /* Jump to target only works with search properties currently, not search callbacks yet.
+ * See ui_but_add_search. */
+ if (coll_search->search_prop != NULL) {
+ found = RNA_property_collection_lookup_string(
+ &coll_search->search_ptr, coll_search->search_prop, str_ptr, &target_ptr);
+ }
if (str_ptr != str_buf) {
MEM_freeN(str_ptr);