summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eel/eel-gdk-pixbuf-extensions.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/eel/eel-gdk-pixbuf-extensions.c b/eel/eel-gdk-pixbuf-extensions.c
index 646a5734..b74b1062 100644
--- a/eel/eel-gdk-pixbuf-extensions.c
+++ b/eel/eel-gdk-pixbuf-extensions.c
@@ -400,9 +400,18 @@ eel_gdk_pixbuf_scale_down (GdkPixbuf *pixbuf,
}
else
{
- *dest++ = r / n_pixels;
- *dest++ = g / n_pixels;
- *dest++ = b / n_pixels;
+ if (n_pixels != 0)
+ {
+ *dest++ = r / n_pixels;
+ *dest++ = g / n_pixels;
+ *dest++ = b / n_pixels;
+ }
+ else
+ {
+ *dest++ = 0;
+ *dest++ = 0;
+ *dest++ = 0;
+ }
}
s_x1 = s_x2;