]> mj.ucw.cz Git - libucw.git/blobdiff - images/dup-cmp.c
MergeImages: Added several config options.
[libucw.git] / images / dup-cmp.c
index 39dc595948bfe19440cf7d4b870df2c262a735fe..9f98b1939dd145b1c7c209bfdb1fb4a45a15eae6 100644 (file)
@@ -152,6 +152,8 @@ same_size_compare(struct image_dup_context *ctx, struct image_dup *dup1, struct
 {
   struct image *img1 = &dup1->image;
   struct image *img2 = &dup2->image;
+  if (!img1->pixels || !img2->pixels)
+    return 1;
   ctx->sum_pixels += img1->cols * img1->rows;
   byte *block1 = img1->pixels;
   byte *block2 = img2->pixels;