aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 */