[gtk+/gtk-style-context: 178/206] GtkStyleSet: Fix compiler warning.



commit 86d0aa4c8666b06eddaabd65ffbb23b0975c6682
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 da31792..60bda7f 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]