aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-04-07 23:09:49 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-04-07 23:09:49 +0800
commit5861eb8e7b1ae59b5e5cf600b36c6bf947b806bc (patch)
treef11be9dfc8912ca32cd554bd012df40a8a999e63 /e-util
parentf85cf8a6dac43610a63b22856bb7cec8936c9c26 (diff)
downloadgsoc2013-evolution-5861eb8e7b1ae59b5e5cf600b36c6bf947b806bc.tar
gsoc2013-evolution-5861eb8e7b1ae59b5e5cf600b36c6bf947b806bc.tar.gz
gsoc2013-evolution-5861eb8e7b1ae59b5e5cf600b36c6bf947b806bc.tar.bz2
gsoc2013-evolution-5861eb8e7b1ae59b5e5cf600b36c6bf947b806bc.tar.lz
gsoc2013-evolution-5861eb8e7b1ae59b5e5cf600b36c6bf947b806bc.tar.xz
gsoc2013-evolution-5861eb8e7b1ae59b5e5cf600b36c6bf947b806bc.tar.zst
gsoc2013-evolution-5861eb8e7b1ae59b5e5cf600b36c6bf947b806bc.zip
Probably fixes bug #56623 and others?
2004-04-07 Jeffrey Stedfast <fejj@ximian.com> Probably fixes bug #56623 and others? * e-signature-list.c (gconf_signatures_changed): Fixed to not use free'd iter memory. Also reverse the new_sigs list before adding them to the signature list (so they are in the same order they appeared in the gconf key). svn path=/trunk/; revision=25352
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog9
-rw-r--r--e-util/e-signature-list.c26
2 files changed, 24 insertions, 11 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index e8e0a8fcc4..1c430aa365 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,12 @@
+2004-04-07 Jeffrey Stedfast <fejj@ximian.com>
+
+ Probably fixes bug #56623 and others?
+
+ * e-signature-list.c (gconf_signatures_changed): Fixed to not use
+ free'd iter memory. Also reverse the new_sigs list before adding
+ them to the signature list (so they are in the same order they
+ appeared in the gconf key).
+
2004-04-05 Jeffrey Stedfast <fejj@ximian.com>
* e-signature-list.c (gconf_signatures_changed): Fixed to not
diff --git a/e-util/e-signature-list.c b/e-util/e-signature-list.c
index ea3d6e7bb7..b14535b2fc 100644
--- a/e-util/e-signature-list.c
+++ b/e-util/e-signature-list.c
@@ -177,9 +177,8 @@ gconf_signatures_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry,
g_signal_emit (signature_list, signals[SIGNATURE_CHANGED], 0, signature);
g_object_unref (iter);
- g_free (uid);
- continue;
+ goto loop;
}
}
@@ -190,18 +189,23 @@ gconf_signatures_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry,
signature = e_signature_new_from_xml (l->data);
e_list_append (E_LIST (signature_list), signature);
new_sigs = g_slist_prepend (new_sigs, signature);
+
+ loop:
+
g_free (uid);
}
- /* Now emit signals for each added signature. */
- l = new_sigs;
- while (l != NULL) {
- n = l->next;
- signature = l->data;
- g_signal_emit (signature_list, signals[SIGNATURE_ADDED], 0, signature);
- g_object_unref (signature);
- g_slist_free_1 (l);
- l = n;
+ if (new_sigs != NULL) {
+ /* Now emit signals for each added signature. */
+ l = g_slist_reverse (new_sigs);
+ while (l != NULL) {
+ n = l->next;
+ signature = l->data;
+ g_signal_emit (signature_list, signals[SIGNATURE_ADDED], 0, signature);
+ g_object_unref (signature);
+ g_slist_free_1 (l);
+ l = n;
+ }
}
/* Anything left in old_sigs must have been deleted */