From f69b364b88ec2a1cdaa72944eedfe2de3f7c1775 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 22 Apr 2016 15:23:59 +0200 Subject: Fix (unreported) crash when listing available fmodifier types. Some types are defined but not yet implemented... --- source/blender/editors/space_graph/graph_edit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/space_graph') diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index e1cd1da3a25..effcd80e1f0 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -2393,7 +2393,9 @@ static EnumPropertyItem *graph_fmodifier_itemf(bContext *C, PointerRNA *UNUSED(p continue; index = RNA_enum_from_value(rna_enum_fmodifier_type_items, fmi->type); - RNA_enum_item_add(&item, &totitem, &rna_enum_fmodifier_type_items[index]); + if (index != -1) { /* Not all types are implemented yet... */ + RNA_enum_item_add(&item, &totitem, &rna_enum_fmodifier_type_items[index]); + } } RNA_enum_item_end(&item, &totitem); -- cgit v1.2.3