From 9f927315eb2536ac37d67ed304c02bcd4ea755c9 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sun, 1 Feb 2015 17:52:10 +0100 Subject: theming: Fix thumbnail sizes validation --- src/setup.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/setup.c b/src/setup.c index f0a6f3d..911a702 100644 --- a/src/setup.c +++ b/src/setup.c @@ -457,8 +457,11 @@ validate_design_setup (TGallerySetup *setup) for (l = g_list_first (setup->design->image_sizes); l; l = g_list_next (l)) { image_size = l->data; g_assert (image_size != NULL); - if (image_size->landscape_width <= 0 || image_size->landscape_height <= 0 || - image_size->portrait_width <= 0 || image_size->portrait_height <= 0) { + if (((! image_size->is_thumbnail || image_size->thumb_crop_style == CROP_STYLE_NORMAL) && ( + image_size->landscape_width <= 0 || image_size->landscape_height <= 0 || + image_size->portrait_width <= 0 || image_size->portrait_height <= 0)) || + (image_size->thumb_crop_style == CROP_STYLE_SQUARED && image_size->square_size <= 0) || + (image_size->thumb_crop_style == CROP_STYLE_FIXED && (image_size->crop_width <= 0 || image_size->crop_height <= 0))) { fprintf (stderr, "design validation warning: image size %s defined with zero sized element\n", image_size->name); continue; } -- cgit v1.2.3