Skip to content

Commit

Permalink
check for return value
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Feb 21, 2025
1 parent aa619a7 commit d9bbb06
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/heif_enc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,11 @@ class input_tiles_generator_cut_image : public input_tiles_generator
heif_error err = heif_image_extract_area(mImage.image.get(), tx * mTileSize, ty * mTileSize, mTileSize, mTileSize,
heif_get_global_security_limits(),
&tileImage);
if (err.code) {
std::cerr << "error extracting tile " << tx << ";" << ty << std::endl;
exit(1);
}

InputImage tile;
tile.image = std::shared_ptr<heif_image>(tileImage,
[](heif_image* img) { heif_image_release(img); });
Expand Down

0 comments on commit d9bbb06

Please sign in to comment.