Skip to content

Commit

Permalink
silence clang-tidy: make sure that returned mem is non-null when ther…
Browse files Browse the repository at this point in the history
…e is no error
  • Loading branch information
farindk committed Nov 16, 2024
1 parent 235e750 commit cac74f9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libheif/pixelimage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,11 @@ Error HeifPixelImage::extend_to_size_with_zero2(uint32_t width, uint32_t height)
return err;
}

// This is not needed, but we have to silence the clang-tidy false positive.
if (!newPlane.mem) {
return Error::InternalError;
}

// copy the visible part of the old plane into the new plane

for (uint32_t y = 0; y < plane->m_height; y++) {
Expand Down

0 comments on commit cac74f9

Please sign in to comment.