svn merge ^/trunk/blender -r42564:42586
[blender-staging.git] / source / blender / editors / mesh / bmesh_tools.c
index c690d77594605899ce700b6d5d867e578954c135..6a01e1fc303b324427ccd91f1ff7065d16fc52d7 100644 (file)
@@ -2778,10 +2778,11 @@ static int select_axis_exec(bContext *C, wmOperator *op)
        int axis= RNA_enum_get(op->ptr, "axis");
        int mode= RNA_enum_get(op->ptr, "mode"); /* -1==aligned, 0==neg, 1==pos*/
 
-       if(ese==NULL)
+       if (ese==NULL || ese->htype != BM_VERT) {
+               BKE_report(op->reports, RPT_WARNING, "This operator requires an active vertex (last selected)");
                return OPERATOR_CANCELLED;
-
-       if (ese->htype==BM_VERT) {
+       }
+       else {
                BMVert *ev, *act_vert= (BMVert*)ese->data;
                BMIter iter;
                float value= act_vert->co[axis];