[gtk+/gtk-style-context: 175/540] GtkStyleSet: Fix compiler warning.



commit 1647334134e8f27d61a6a78cf9b7a53561ab57be
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Aug 4 17:50:52 2010 +0200

    GtkStyleSet: Fix compiler warning.

 gtk/gtkstyleset.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkstyleset.c b/gtk/gtkstyleset.c
index d2053db..e8b96cc 100644
--- a/gtk/gtkstyleset.c
+++ b/gtk/gtkstyleset.c
@@ -601,7 +601,7 @@ gtk_style_set_get_valist (GtkStyleSet  *set,
         }
       else
         {
-          GValue *val;
+          GValue *val = NULL;
 
           if (prop)
             {
@@ -610,7 +610,8 @@ gtk_style_set_get_valist (GtkStyleSet  *set,
               else if (G_IS_VALUE (&prop->default_value))
                 val = &prop->default_value;
             }
-          else
+
+          if (!val)
             val = &node->default_value;
 
           if (G_VALUE_TYPE (val) == GTK_TYPE_SYMBOLIC_COLOR)



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