[gtk+] Added an extra validation in gdk_pixbuf_loader_set_size()



commit 64812ce662835b1967791196944b73b2d2617f7a
Author: Javier Jardón <jjardon gnome org>
Date:   Tue May 4 00:33:48 2010 +0200

    Added an extra validation in gdk_pixbuf_loader_set_size()
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=380196

 gdk-pixbuf/gdk-pixbuf-loader.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c
index 9ef23c1..6b7b547 100644
--- a/gdk-pixbuf/gdk-pixbuf-loader.c
+++ b/gdk-pixbuf/gdk-pixbuf-loader.c
@@ -221,9 +221,13 @@ gdk_pixbuf_loader_set_size (GdkPixbufLoader *loader,
 			    gint             width,
 			    gint             height)
 {
-        GdkPixbufLoaderPrivate *priv = GDK_PIXBUF_LOADER (loader)->priv;
+        GdkPixbufLoaderPrivate *priv;
+
+        g_return_if_fail (GDK_IS_PIXBUF_LOADER (loader));
         g_return_if_fail (width >= 0 && height >= 0);
 
+        priv = GDK_PIXBUF_LOADER (loader)->priv;
+
         if (!priv->size_fixed) 
                 {
                         priv->width = width;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]