aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-display.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-07-09 06:59:23 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-07-09 06:59:23 +0800
commita2ab50c057cbe9baafa63372767c5022901838f6 (patch)
treec91c81252034914677e56926357cc95627ce538b /mail/mail-display.c
parent82c99d625bf2d763adf0b812dd59b92a4aaa4735 (diff)
downloadgsoc2013-evolution-a2ab50c057cbe9baafa63372767c5022901838f6.tar
gsoc2013-evolution-a2ab50c057cbe9baafa63372767c5022901838f6.tar.gz
gsoc2013-evolution-a2ab50c057cbe9baafa63372767c5022901838f6.tar.bz2
gsoc2013-evolution-a2ab50c057cbe9baafa63372767c5022901838f6.tar.lz
gsoc2013-evolution-a2ab50c057cbe9baafa63372767c5022901838f6.tar.xz
gsoc2013-evolution-a2ab50c057cbe9baafa63372767c5022901838f6.tar.zst
gsoc2013-evolution-a2ab50c057cbe9baafa63372767c5022901838f6.zip
Don't ever use the mail-display's current_message, this can cause
2002-07-08 Jeffrey Stedfast <fejj@ximian.com> * mail-callbacks.c (redirect): Don't ever use the mail-display's current_message, this can cause problems. * mail-ops.c (get_message_free): Unref the gotten message. All of the callers seemed to think that they didn't have to unref the message. * mail-display.c (mail_display_set_message): Now refs the message. (mail_display_destroy): Unref the current_message if we still have ownership of it. svn path=/trunk/; revision=17387
Diffstat (limited to 'mail/mail-display.c')
-rw-r--r--mail/mail-display.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/mail/mail-display.c b/mail/mail-display.c
index 0832875605..b5e57f6015 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -1626,7 +1626,11 @@ mail_display_set_message (MailDisplay *md, CamelMedium *medium, const char *foll
g_free (md->followup);
- md->current_message = (CamelMimeMessage *) medium;
+ if (medium) {
+ camel_object_ref (medium);
+ md->current_message = (CamelMimeMessage *) medium;
+ } else
+ md->current_message = NULL;
md->followup = followup ? message_tag_followup_decode (followup) : NULL;
@@ -1639,9 +1643,9 @@ mail_display_set_message (MailDisplay *md, CamelMedium *medium, const char *foll
}
/**
- * mail_display_set_message:
+ * mail_display_set_charset:
* @mail_display: the mail display object
- * @medium: the input camel medium, or %NULL
+ * @charset: charset or %NULL
*
* Makes the mail_display object show the contents of the medium
* param.
@@ -1677,7 +1681,6 @@ mail_display_init (GtkObject *object)
{
MailDisplay *mail_display = MAIL_DISPLAY (object);
- mail_display->current_message = NULL;
mail_display->scroll = NULL;
mail_display->html = NULL;
mail_display->redisplay_counter = 0;
@@ -1703,6 +1706,9 @@ mail_display_destroy (GtkObject *object)
gtk_object_unref (GTK_OBJECT (mail_display->html));
+ if (mail_display->current_message)
+ camel_object_unref (mail_display->current_message);
+
g_free (mail_display->charset);
g_free (mail_display->selection);
g_free (mail_display->followup);