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 33c5343e410..b7fd6a50e6d 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -3062,9 +3062,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; } } } |