From 95e7848f053f69ff49bf685c362dd410353f2918 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Mon, 29 Dec 2003 21:53:10 +0000 Subject: [PATCH] reset the GValue if there's a problem getting it (will force it to NULL). 2003-12-29 Chris Toshok * 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 | 5 +++++ addressbook/libebook/e-contact.c | 1 + 2 files changed, 6 insertions(+) diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index bb07f97..79ad4ae 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,5 +1,10 @@ 2003-12-29 Chris Toshok + * 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 + * 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 diff --git a/addressbook/libebook/e-contact.c b/addressbook/libebook/e-contact.c index f87bafe..988bd45 100644 --- a/addressbook/libebook/e-contact.c +++ b/addressbook/libebook/e-contact.c @@ -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; } -- 2.7.4