From 90ced1b58b5ea4b39afc04f1320b3256d9d83b93 Mon Sep 17 00:00:00 2001 From: Dirk Farin Date: Wed, 16 Oct 2024 18:19:17 +0200 Subject: [PATCH] fix returning created grid image --- libheif/api/libheif/heif.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libheif/api/libheif/heif.cc b/libheif/api/libheif/heif.cc index 558b664f96..0e398115b4 100644 --- a/libheif/api/libheif/heif.cc +++ b/libheif/api/libheif/heif.cc @@ -3477,7 +3477,6 @@ struct heif_error heif_context_add_grid_image(struct heif_context* ctx, "Number of tile rows/columns may not exceed 65535"}; } - std::shared_ptr gridimage; auto generateGridItemResult = ImageItem_Grid::add_new_grid_item(ctx->context.get(), image_width, image_height, @@ -3490,7 +3489,7 @@ struct heif_error heif_context_add_grid_image(struct heif_context* ctx, if (out_grid_image_handle) { *out_grid_image_handle = new heif_image_handle; - (*out_grid_image_handle)->image = gridimage; + (*out_grid_image_handle)->image = generateGridItemResult.value; (*out_grid_image_handle)->context = ctx->context; }