gnome-terminal r2696 - trunk/src



Author: chpe
Date: Thu May 29 19:46:04 2008
New Revision: 2696
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=2696&view=rev

Log:
Make sure the GValue is initialised in the notify==TRUE case.


Modified:
   trunk/src/terminal-profile.c

Modified: trunk/src/terminal-profile.c
==============================================================================
--- trunk/src/terminal-profile.c	(original)
+++ trunk/src/terminal-profile.c	Thu May 29 19:46:04 2008
@@ -470,7 +470,10 @@
   GValue *value;
 
   if (notify)
-    value = &value_;
+    {
+      value = &value_;
+      g_value_init (value, G_PARAM_SPEC_VALUE_TYPE (pspec));
+    }
   else
     value = g_value_array_get_nth (priv->properties, pspec->param_id);
   g_assert (value != NULL);
@@ -500,7 +503,10 @@
     }
 
   if (notify)
-    g_object_set_property (G_OBJECT (profile), pspec->name, value);
+    {
+      g_object_set_property (G_OBJECT (profile), pspec->name, value);
+      g_value_unset (value);
+    }
 }
 
 static void



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