diff --git a/examples/heif_thumbnailer.cc b/examples/heif_thumbnailer.cc index d553c28b9c..e3cf4a93d4 100644 --- a/examples/heif_thumbnailer.cc +++ b/examples/heif_thumbnailer.cc @@ -185,6 +185,11 @@ int main(int argc, char** argv) thumbnail_width = thumbnail_height = 0; } + if (thumbnail_width == 0 || thumbnail_height == 0) { + std::cerr << "Zero thumbnail output size\n"; + return 1; + } + // --- output thumbnail smaller than HEIF thumbnail -> scale down