[gdk-pixbuf] Avoid a possible divide-by-zero
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf] Avoid a possible divide-by-zero
- Date: Sat, 6 Jun 2015 22:12:15 +0000 (UTC)
commit 74c418ba2e41ab9e2287420378a6192788b1fab6
Author: Sarita Rawat <sarita rawat samsung com>
Date: Fri Jun 5 06:56:00 2015 +0000
Avoid a possible divide-by-zero
Pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=750440
gdk-pixbuf/gdk-pixbuf-loader.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c
index 65845ed..668b703 100644
--- a/gdk-pixbuf/gdk-pixbuf-loader.c
+++ b/gdk-pixbuf/gdk-pixbuf-loader.c
@@ -330,7 +330,7 @@ gdk_pixbuf_loader_prepare (GdkPixbuf *pixbuf,
else
anim = gdk_pixbuf_non_anim_new (pixbuf);
- if (priv->needs_scale) {
+ if (priv->needs_scale && width != 0 && height != 0) {
priv->animation = GDK_PIXBUF_ANIMATION (_gdk_pixbuf_scaled_anim_new (anim,
(double) priv->width / width,
(double) priv->height / height,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]