Fix #110426: render hanging when drawing metadata in the image editor

Release must be called regardless if the returned image buffer pointer
is null.
This commit is contained in:
Brecht Van Lommel
2023-07-26 18:46:18 +02:00
parent 0c07fb50c8
commit b3223d3f4f

View File

@@ -678,8 +678,8 @@ static void image_main_region_draw(const bContext *C, ARegion *region)
BLI_rctf_init(&frame, 0.0f, ibuf->x, 0.0f, ibuf->y);
UI_view2d_view_to_region(&region->v2d, 0.0f, 0.0f, &x, &y);
ED_region_image_metadata_draw(x, y, ibuf, &frame, zoomx, zoomy);
ED_space_image_release_buffer(sima, ibuf, lock);
}
ED_space_image_release_buffer(sima, ibuf, lock);
}
/* sample line */