diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-04-22 16:23:59 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-04-22 16:23:59 +0300 |
commit | f69b364b88ec2a1cdaa72944eedfe2de3f7c1775 (patch) | |
tree | dbeb102d3e24959b3c2c1fde2b43da996dbb2756 /source | |
parent | a2779a460669fbf49a8b8f1acc9e8ddbc10dd7cf (diff) |
Fix (unreported) crash when listing available fmodifier types.
Some types are defined but not yet implemented...
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_graph/graph_edit.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_nla/nla_edit.c | 4 |
2 files changed, 6 insertions, 2 deletions
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); diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index baf87f3fee5..a2159696394 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -2259,7 +2259,9 @@ static EnumPropertyItem *nla_fmodifier_itemf(bContext *C, PointerRNA *UNUSED(ptr 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); |