From 09881e170e09cd89a6f8c755ded35f73849c240f Mon Sep 17 00:00:00 2001 From: Dirk Farin Date: Sun, 20 Oct 2024 17:03:38 +0200 Subject: [PATCH] remove dead code branch --- libheif/api/libheif/heif.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/libheif/api/libheif/heif.cc b/libheif/api/libheif/heif.cc index bc29e6d658..f2b85e10b5 100644 --- a/libheif/api/libheif/heif.cc +++ b/libheif/api/libheif/heif.cc @@ -3711,14 +3711,9 @@ struct heif_error heif_context_encode_thumbnail(struct heif_context* ctx, if (out_image_handle) { - if (thumbnail_image) { - *out_image_handle = new heif_image_handle; - (*out_image_handle)->image = thumbnail_image; - (*out_image_handle)->context = ctx->context; - } - else { - *out_image_handle = nullptr; - } + *out_image_handle = new heif_image_handle; + (*out_image_handle)->image = thumbnail_image; + (*out_image_handle)->context = ctx->context; } return heif_error_success;