aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-display.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-04-20 08:41:25 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-04-20 08:41:25 +0800
commit5d8a4ea16f86e62f1c14c5acffb075aa59e1aa5a (patch)
tree08790d6e5891e6e1e3b211d64758436936a314e9 /mail/mail-display.c
parent4cd8394cf68e5c58bb462e057ce3bac41032f3c1 (diff)
downloadgsoc2013-evolution-5d8a4ea16f86e62f1c14c5acffb075aa59e1aa5a.tar.gz
gsoc2013-evolution-5d8a4ea16f86e62f1c14c5acffb075aa59e1aa5a.tar.zst
gsoc2013-evolution-5d8a4ea16f86e62f1c14c5acffb075aa59e1aa5a.zip
Ref the html object here, this is an async handler so it's possible for
2002-04-19 Jeffrey Stedfast <fejj@ximian.com> * mail-display.c (stream_write_or_redisplay_when_loaded): Ref the html object here, this is an async handler so it's possible for our caller (or someone else) to unref the html object before we finish. (load_content_free): Unref the async handler's ref of the html object here. (mail_display_new): Ref the html widget here so that we can be sure that so long as the mail-display is "alive", so is the html object. See bug #22328 for details. Basically, the message-browser is being closed before the message gets loaded and so the html object was being destroyed but the mail-display was still alive. (mail_display_destroy): Unref the html object when the mail-display is destroyed. svn path=/trunk/; revision=16544
Diffstat (limited to 'mail/mail-display.c')
-rw-r--r--mail/mail-display.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mail/mail-display.c b/mail/mail-display.c
index a4d3ae65bd..cabab31feb 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -1355,6 +1355,7 @@ load_content_free (struct _mail_msg *mm)
struct _load_content_msg *m = (struct _load_content_msg *)mm;
g_free (m->url);
+ gtk_object_unref (GTK_OBJECT (m->html));
gtk_object_unref (GTK_OBJECT (m->display));
camel_object_unref (CAMEL_OBJECT (m->message));
}
@@ -1396,6 +1397,7 @@ stream_write_or_redisplay_when_loaded (MailDisplay *md,
m->display = md;
gtk_object_ref (GTK_OBJECT (m->display));
m->html = html;
+ gtk_object_ref (GTK_OBJECT (html));
m->handle = handle;
m->url = g_strdup (url);
m->redisplay_counter = md->redisplay_counter;
@@ -1682,7 +1684,9 @@ static void
mail_display_destroy (GtkObject *object)
{
MailDisplay *mail_display = MAIL_DISPLAY (object);
-
+
+ gtk_object_unref (GTK_OBJECT (mail_display->html));
+
g_free (mail_display->charset);
g_free (mail_display->selection);
g_free (mail_display->followup);
@@ -2289,6 +2293,7 @@ mail_display_new (void)
mail_display->scroll = E_SCROLL_FRAME (scroll);
mail_display->html = GTK_HTML (html);
+ gtk_object_ref (GTK_OBJECT (mail_display->html));
mail_display->last_active = NULL;
mail_display->data = g_new0 (GData *, 1);
g_datalist_init (mail_display->data);