Small cleanup on curve separation error handling
authorDalai Felinto <dfelinto@gmail.com>
Fri, 2 Nov 2018 17:11:51 +0000 (14:11 -0300)
committerDalai Felinto <dfelinto@gmail.com>
Fri, 2 Nov 2018 17:12:20 +0000 (14:12 -0300)
source/blender/editors/curve/editcurve.c

index adddb593878194eeb974c8d0b927e1ae88e3e4c0..6331d9a3fac981e0222e8dcc5311e8803312b99c 100644 (file)
@@ -1371,8 +1371,8 @@ static int separate_exec(bContext *C, wmOperator *op)
                return OPERATOR_CANCELLED;
        }
 
-       if (status.error_vertex_keys || status.error_generic) {
-               const int tot_errors = status.error_vertex_keys + status.error_generic;
+       const int tot_errors = status.error_vertex_keys + status.error_generic;
+       if (tot_errors > 0) {
 
                /* Some curves changed, but some curves failed: don't explain why it failed. */
                if (status.changed) {