diff options
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 849b42ccb2c..e5dd8373bf7 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -3005,9 +3005,9 @@ void BKE_object_dimensions_set_ex(Object *ob, } } - if (len[i] > 0.0f) { - - ob->scale[i] = copysignf(value[i] / len[i], ob->scale[i]); + const float scale = copysignf(value[i] / len[i], ob->scale[i]); + if (isfinite(scale)) { + ob->scale[i] = scale; } } } |