Skip to content

Commit 7a3383f

Browse files
committed
return error when first tile references a non-existing image (#1472)
1 parent 7647ea3 commit 7a3383f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libheif/image-items/grid.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ heif_image_tiling ImageItem_Grid::get_heif_image_tiling() const
539539
if (!tile_ids.empty() && tile_ids[0] != 0) {
540540
heif_item_id tile0_id = tile_ids[0];
541541
auto tile0 = get_context()->get_image(tile0_id, true);
542-
if (tile0->get_item_error()) {
542+
if (tile0 == nullptr || tile0->get_item_error()) {
543543
return tiling;
544544
}
545545

0 commit comments

Comments
 (0)