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