Fix T75203: Crash when changing active keying set

When updating the active button, the search data wasn't updated, so it
kept using the old pointers. A check in `ui_rna_collection_search_cb()`
relied on this incorrect behavior so I had to fix that too. Note that
the previous commit was also needed for the second fix to work.

Caused by c46dcdf887.
This commit is contained in:
2020-04-08 23:08:32 +02:00
parent 74fa8787d8
commit 1239cab11f
4 changed files with 21 additions and 4 deletions

View File

@@ -399,7 +399,7 @@ void ui_rna_collection_search_cb(const struct bContext *C,
int i = 0, iconid = 0, flag = RNA_property_flag(data->target_prop);
ListBase *items_list = MEM_callocN(sizeof(ListBase), "items_list");
CollItemSearch *cis;
const bool skip_filter = (data->but_changed && !(*data->but_changed));
const bool skip_filter = data->search_but && !data->search_but->changed;
/* build a temporary list of relevant items first */
RNA_PROP_BEGIN (&data->search_ptr, itemptr, data->search_prop) {