diff options
-rw-r--r-- | thumbnailer/gnome-thumbnailer-skeleton.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/thumbnailer/gnome-thumbnailer-skeleton.c b/thumbnailer/gnome-thumbnailer-skeleton.c index 10b8d73cb..d686432c2 100644 --- a/thumbnailer/gnome-thumbnailer-skeleton.c +++ b/thumbnailer/gnome-thumbnailer-skeleton.c @@ -88,6 +88,9 @@ gnome_desktop_thumbnail_scale_down_pixbuf (GdkPixbuf *pixbuf, dy = ddy.quot; dy_frac = ddy.rem; + g_assert (dx >= 1); + g_assert (dy >= 1); + has_alpha = gdk_pixbuf_get_has_alpha (pixbuf); source_rowstride = gdk_pixbuf_get_rowstride (pixbuf); src_pixels = gdk_pixbuf_get_pixels (pixbuf); @@ -146,7 +149,9 @@ gnome_desktop_thumbnail_scale_down_pixbuf (GdkPixbuf *pixbuf, } src += source_rowstride; } - + + g_assert (n_pixels > 0); + if (has_alpha) { if (a != 0) { *dest++ = r / a; |