diff --git a/source/blender/render/intern/multires_bake.cc b/source/blender/render/intern/multires_bake.cc index 3561b714fb4..c1871c8d429 100644 --- a/source/blender/render/intern/multires_bake.cc +++ b/source/blender/render/intern/multires_bake.cc @@ -611,11 +611,7 @@ static void do_multires_bake(MultiresBakeRender *bkr, do_multires_bake_thread(&handles[0]); } - /* construct bake result */ - result->height_min = handles[0].height_min; - result->height_max = handles[0].height_max; - - for (i = 1; i < tot_thread; i++) { + for (i = 0; i < tot_thread; i++) { result->height_min = min_ff(result->height_min, handles[i].height_min); result->height_max = max_ff(result->height_max, handles[i].height_max); } @@ -1472,6 +1468,10 @@ static void bake_images(MultiresBakeRender *bkr, MultiresBakeResult *result) { LinkData *link; + /* construct bake result */ + result->height_min = FLT_MAX; + result->height_max = -FLT_MAX; + for (link = static_cast(bkr->image.first); link; link = link->next) { Image *ima = (Image *)link->data;