reset the GValue if there's a problem getting it (will force it to NULL).
authorChris Toshok <toshok@ximian.com>
Mon, 29 Dec 2003 21:53:10 +0000 (21:53 +0000)
committerChris Toshok <toshok@src.gnome.org>
Mon, 29 Dec 2003 21:53:10 +0000 (21:53 +0000)
2003-12-29  Chris Toshok  <toshok@ximian.com>

* libebook/e-contact.c (e_contact_get_property): reset the GValue
if there's a problem getting it (will force it to NULL).

addressbook/ChangeLog
addressbook/libebook/e-contact.c

index bb07f97..79ad4ae 100644 (file)
@@ -1,5 +1,10 @@
 2003-12-29  Chris Toshok  <toshok@ximian.com>
 
+       * libebook/e-contact.c (e_contact_get_property): reset the GValue
+       if there's a problem getting it (will force it to NULL).
+
+2003-12-29  Chris Toshok  <toshok@ximian.com>
+
        * libebook/e-contact.c (e_contact_get): initialize value to NULL
        so that if the field is unknown (meaning we haven't gotten around
        to implementing it yet, like the category list stuff), we don't
index f87bafe..988bd45 100644 (file)
@@ -932,6 +932,7 @@ e_contact_get_property (GObject *object,
 
        if (prop_id < 1 || prop_id >= E_CONTACT_FIELD_LAST) {
                G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+               g_value_reset (value);
                return;
        }