From eb57856a19127f8867974470dfbfb7524740cd70 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 17 May 2012 10:42:24 +0000 Subject: 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!). --- source/blender/editors/mesh/editmesh_select.c | 9 +++++++-- 1 file 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; } -- cgit v1.2.3