From f700f715280e88a3575bc492dbe12d661bf27580 Mon Sep 17 00:00:00 2001 From: Dirk Farin Date: Tue, 22 Oct 2024 20:34:23 +0200 Subject: [PATCH] fix logic error --- libheif/image-items/unc_image.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libheif/image-items/unc_image.cc b/libheif/image-items/unc_image.cc index 568b1fba78..b84f5b9420 100644 --- a/libheif/image-items/unc_image.cc +++ b/libheif/image-items/unc_image.cc @@ -468,11 +468,12 @@ void ImageItem_uncompressed::get_tile_size(uint32_t& w, uint32_t& h) const auto uncC = get_file()->get_property(get_id()); if (!ispe || !uncC) { - w=h=0; + w = h = 0; + } + else { + w = ispe->get_width() / uncC->get_number_of_tile_columns(); + h = ispe->get_height() / uncC->get_number_of_tile_rows(); } - - w = ispe->get_width() / uncC->get_number_of_tile_columns(); - h = ispe->get_height() / uncC->get_number_of_tile_rows(); }