diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-05-17 14:42:24 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-05-17 14:42:24 +0400 |
commit | eb57856a19127f8867974470dfbfb7524740cd70 (patch) | |
tree | b0813cc9baba32f458c36fb0480f7a585e02b362 /source/blender/editors/mesh | |
parent | dde529e97757d3cf7bab2e6dce20b7fddbd968cf (diff) |
Fix select_similar_type_itemf() enum-item-generator func to return the whole prop_similar_types when context is NULL (needed at least by i18n tools!).
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index f1393e4def1..2df89a3df6c 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -834,7 +834,12 @@ static int edbm_select_similar_exec(bContext *C, wmOperator *op) static EnumPropertyItem *select_similar_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free) { - Object *obedit = CTX_data_edit_object(C); + Object *obedit; + + if (!C) /* needed for docs and i18n tools */ + return prop_similar_types; + + obedit = CTX_data_edit_object(C); if (obedit && obedit->type == OB_MESH) { EnumPropertyItem *item = NULL; @@ -862,7 +867,7 @@ static EnumPropertyItem *select_similar_type_itemf(bContext *C, PointerRNA *UNUS return item; } - + return NULL; } |