diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-01-25 01:12:38 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-01-25 01:13:20 +0400 |
commit | c0a40892652e89601060a9590ea0a6f0606d28bb (patch) | |
tree | 2476422086a0ff945e53d51695ebededa7829c70 /source/blender/editors/interface/interface_templates.c | |
parent | 28564e158389eb3c6a1dc7d0f2f6fd5271d3fe1f (diff) |
Fix T38356: Crash when UIList.filter_items returns too few items.
Diffstat (limited to 'source/blender/editors/interface/interface_templates.c')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index fe3fb726115..14ec4d5e0f0 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -2806,14 +2806,8 @@ void uiTemplateList(uiLayout *layout, bContext *C, const char *listtype_name, co ui_list->layout_type = layout_type; /* Reset filtering data. */ - if (dyn_data->items_filter_flags) { - MEM_freeN(dyn_data->items_filter_flags); - dyn_data->items_filter_flags = NULL; - } - if (dyn_data->items_filter_neworder) { - MEM_freeN(dyn_data->items_filter_neworder); - dyn_data->items_filter_neworder = NULL; - } + MEM_SAFE_FREE(dyn_data->items_filter_flags); + MEM_SAFE_FREE(dyn_data->items_filter_neworder); dyn_data->items_len = dyn_data->items_shown = -1; /* When active item changed since last draw, scroll to it. */ |