Cleanup/refactor binding code for MeshDeform modifier.
[blender.git] / source / blender / modifiers / intern / MOD_surfacedeform.c
index 5a2b54824cced721941715b775266d69db8aa774..6c6cbe3a538153d4dc63ad0bfe68513b860f30ac 100644 (file)
@@ -1126,7 +1126,7 @@ static void surfacedeformModifier_do(
        }
 
        target = BKE_modifier_get_evaluated_mesh_from_evaluated_object(smd->target, &free_target);
-       if (!target && smd->verts == NULL && ob == DEG_get_original_object(ob)) {
+       if (target == NULL && smd->verts == NULL && ob == DEG_get_original_object(ob)) {
                /* Special case, binding happens outside of depsgraph evaluation, so we can build our own
                 * target mesh if needed. */
                target = mesh_create_eval_final_view(ctx->depsgraph, DEG_get_input_scene(ctx->depsgraph), smd->target, 0);