aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-02-21 03:06:19 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-02-21 03:06:19 +0800
commit1d10cdded5ac9b95aeb3c6f6b3bceaf02bd40305 (patch)
tree4d5dd50a71c4a4a04ad584fcf3307e18777a88c3 /mail
parent07d2720a34616d1372f62623b124962a7e6d6bf0 (diff)
downloadgsoc2013-evolution-1d10cdded5ac9b95aeb3c6f6b3bceaf02bd40305.tar
gsoc2013-evolution-1d10cdded5ac9b95aeb3c6f6b3bceaf02bd40305.tar.gz
gsoc2013-evolution-1d10cdded5ac9b95aeb3c6f6b3bceaf02bd40305.tar.bz2
gsoc2013-evolution-1d10cdded5ac9b95aeb3c6f6b3bceaf02bd40305.tar.lz
gsoc2013-evolution-1d10cdded5ac9b95aeb3c6f6b3bceaf02bd40305.tar.xz
gsoc2013-evolution-1d10cdded5ac9b95aeb3c6f6b3bceaf02bd40305.tar.zst
gsoc2013-evolution-1d10cdded5ac9b95aeb3c6f6b3bceaf02bd40305.zip
Fix for bug #53997
2004-02-20 Jeffrey Stedfast <fejj@ximian.com> Fix for bug #53997 * em-folder-view.c (emfv_list_message_selected): Ref the emfv before spawning the async event. (emfv_list_done_message_selected): Check emfv->preview != NULL. Also unref the emfv when done. svn path=/trunk/; revision=24820
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/em-folder-view.c10
2 files changed, 18 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 45d3b38948..5d9709bef8 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,12 @@
+2004-02-20 Jeffrey Stedfast <fejj@ximian.com>
+
+ Fix for bug #53997
+
+ * em-folder-view.c (emfv_list_message_selected): Ref the emfv
+ before spawning the async event.
+ (emfv_list_done_message_selected): Check emfv->preview !=
+ NULL. Also unref the emfv when done.
+
2004-02-20 Dan Winship <danw@ximian.com>
* mail-component.c (set_prop): Remove the debug message here.
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index bec6164409..fe37964206 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -1742,7 +1742,12 @@ static void
emfv_list_done_message_selected(CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data)
{
EMFolderView *emfv = data;
-
+
+ if (emfv->preview == NULL) {
+ g_object_unref (emfv);
+ return;
+ }
+
em_format_format((EMFormat *)emfv->preview, folder, uid, msg);
if (emfv->priv->seen_id)
@@ -1762,6 +1767,8 @@ emfv_list_done_message_selected(CamelFolder *folder, const char *uid, CamelMimeM
camel_folder_set_message_flags(emfv->folder, uid, CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
}
}
+
+ g_object_unref (emfv);
}
static void
@@ -1774,6 +1781,7 @@ emfv_list_message_selected(MessageList *ml, const char *uid, EMFolderView *emfv)
if (emfv->displayed_uid == NULL || strcmp(emfv->displayed_uid, uid) != 0) {
g_free(emfv->displayed_uid);
emfv->displayed_uid = g_strdup(uid);
+ g_object_ref (emfv);
mail_get_message(emfv->folder, uid, emfv_list_done_message_selected, emfv, mail_thread_new);
}
} else {