Skip to content

Commit

Permalink
fix crash when grid child image does not exist (#1284)
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Aug 26, 2024
1 parent db04de9 commit 4a3094e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libheif/codecs/grid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,10 @@ int ImageItem_Grid::get_luma_bits_per_pixel() const
}

auto image = get_context()->get_image(child);
if (!image) {
return -1;
}

return image->get_luma_bits_per_pixel();
}

Expand Down

0 comments on commit 4a3094e

Please sign in to comment.