aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-03-21 04:25:22 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-03-21 04:25:22 +0800
commit10325a5d48ac226cb75cace350094f760710a33e (patch)
tree11011f4c4a1fe83fb1553e3688389979ee26c5b6 /mail
parent91c10248f8b8a3d361439e45764a72127ac3b5c9 (diff)
downloadgsoc2013-evolution-10325a5d48ac226cb75cace350094f760710a33e.tar.gz
gsoc2013-evolution-10325a5d48ac226cb75cace350094f760710a33e.tar.zst
gsoc2013-evolution-10325a5d48ac226cb75cace350094f760710a33e.zip
Make sure we can find the registered handler before trying to remove it
2003-03-20 Jeffrey Stedfast <fejj@ximian.com> * mail-config.c (mail_config_signature_unregister_client): Make sure we can find the registered handler before trying to remove it from the list. svn path=/trunk/; revision=20443
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog4
-rw-r--r--mail/mail-config.c11
2 files changed, 11 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index d4bb8a9198..60e03ccb2a 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,9 @@
2003-03-20 Jeffrey Stedfast <fejj@ximian.com>
+ * mail-config.c (mail_config_signature_unregister_client): Make
+ sure we can find the registered handler before trying to remove it
+ from the list.
+
* mail-session.c (do_user_message): Make the 5th argument to
gtk_message_dialog_new() "%s" and move the m->prompt to arg 6 so
that we are safe if the prompt string contains any %'s. Also
diff --git a/mail/mail-config.c b/mail/mail-config.c
index f65eee55da..cfd550e716 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -1341,6 +1341,8 @@ mail_config_signature_set_name (MailConfigSignature *sig, const char *name)
static GList *clients = NULL;
+/* uh...the following code is snot. this needs to be fixed. I just don't feel like doing it right now. */
+
void
mail_config_signature_register_client (MailConfigSignatureClient client, gpointer data)
{
@@ -1352,10 +1354,11 @@ void
mail_config_signature_unregister_client (MailConfigSignatureClient client, gpointer data)
{
GList *link;
-
- link = g_list_find (clients, data);
- clients = g_list_remove_link (clients, link->prev);
- clients = g_list_remove_link (clients, link);
+
+ if ((link = g_list_find (clients, data)) != NULL) {
+ clients = g_list_remove_link (clients, link->prev);
+ clients = g_list_remove_link (clients, link);
+ }
}
void