diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-03-21 04:25:22 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-03-21 04:25:22 +0800 |
commit | 10325a5d48ac226cb75cace350094f760710a33e (patch) | |
tree | 11011f4c4a1fe83fb1553e3688389979ee26c5b6 /mail/mail-config.c | |
parent | 91c10248f8b8a3d361439e45764a72127ac3b5c9 (diff) | |
download | gsoc2013-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/mail-config.c')
-rw-r--r-- | mail/mail-config.c | 11 |
1 files changed, 7 insertions, 4 deletions
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 |