Fix: Property search crashes searching enums with separators

This commit is contained in:
Hans Goudey 2020-09-16 13:05:28 -05:00
parent 6759b8a224
commit 5cf6f5e66d
1 changed files with 4 additions and 0 deletions

View File

@ -5253,6 +5253,10 @@ static bool button_matches_search_filter(uiBut *but, const char *search_filter)
}
for (int i = 0; i < items_len; i++) {
/* Check for NULL name field which enums use for separators. */
if (items_array[i].name == NULL) {
continue;
}
if (BLI_strcasestr(items_array[i].name, search_filter)) {
return true;
}