diff options
-rw-r--r-- | source/blender/geometry/intern/uv_parametrizer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/geometry/intern/uv_parametrizer.c b/source/blender/geometry/intern/uv_parametrizer.c index 7b63dcb5ff0..dd97a996b18 100644 --- a/source/blender/geometry/intern/uv_parametrizer.c +++ b/source/blender/geometry/intern/uv_parametrizer.c @@ -4841,10 +4841,10 @@ void GEO_uv_parametrizer_pack(ParamHandle *handle, BLI_box_pack_2d(boxarray, phandle->ncharts - unpacked, &tot_width, &tot_height); if (tot_height > tot_width) { - scale = 1.0f / tot_height; + scale = tot_height != 0.0f ? (1.0f / tot_height) : 1.0f; } else { - scale = 1.0f / tot_width; + scale = tot_width != 0.0f ? (1.0f / tot_width) : 1.0f; } for (i = 0; i < phandle->ncharts - unpacked; i++) { |