Skip to content

Commit

Permalink
Clarify assertion for the sake of static analysis
Browse files Browse the repository at this point in the history
Signed-off-by: Larry Gritz <[email protected]>
  • Loading branch information
lgritz committed Jan 24, 2024
1 parent 99b4955 commit c6c8884
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/oiiotool/printinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,9 +529,9 @@ OiioTool::print_info(std::ostream& out, Oiiotool& ot, ImageRec* img,
}

for (int s = 0, nsubimages = img->subimages(); s < nsubimages; ++s) {
DASSERT((opt.native ? img->nativespec(s) : img->spec(s)) != nullptr);
print_info_subimage(out, ot, s, nsubimages, img->miplevels(s),
opt.native ? *img->nativespec(s) : *img->spec(s),
const ImageSpec* spec = opt.native ? img->nativespec(s) : img->spec(s);
DASSERT(spec != nullptr);
print_info_subimage(out, ot, s, nsubimages, img->miplevels(s), *spec,
img, nullptr, "", opt, field_re, field_exclude_re,
serformat, verbose);
// If opt.subimages is not set, we print info about first subimage
Expand Down

0 comments on commit c6c8884

Please sign in to comment.