aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-display.c
diff options
context:
space:
mode:
authorLarry Ewing <lewing@ximian.com>2002-10-28 17:16:05 +0800
committerLarry Ewing <lewing@src.gnome.org>2002-10-28 17:16:05 +0800
commit529b6c87c3341d6249a65cd092d0244c704f6aa0 (patch)
treee286dc7bf2a02bcc9a4f3867a8ca3ad5b1e84f32 /mail/mail-display.c
parentc8498cbd6164f48558f62a3bc970f419f9102227 (diff)
downloadgsoc2013-evolution-529b6c87c3341d6249a65cd092d0244c704f6aa0.tar
gsoc2013-evolution-529b6c87c3341d6249a65cd092d0244c704f6aa0.tar.gz
gsoc2013-evolution-529b6c87c3341d6249a65cd092d0244c704f6aa0.tar.bz2
gsoc2013-evolution-529b6c87c3341d6249a65cd092d0244c704f6aa0.tar.lz
gsoc2013-evolution-529b6c87c3341d6249a65cd092d0244c704f6aa0.tar.xz
gsoc2013-evolution-529b6c87c3341d6249a65cd092d0244c704f6aa0.tar.zst
gsoc2013-evolution-529b6c87c3341d6249a65cd092d0244c704f6aa0.zip
don't queue the action until we've added ourselves to the active list,
2002-10-27 Larry Ewing <lewing@ximian.com> * mail-display.c (fetch_next): don't queue the action until we've added ourselves to the active list, because the fetch_done callback can fire immediately and we'll end up queueing something that has already been destroyed. svn path=/trunk/; revision=18452
Diffstat (limited to 'mail/mail-display.c')
-rw-r--r--mail/mail-display.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/mail/mail-display.c b/mail/mail-display.c
index df71ddb368..c088323f56 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -1327,13 +1327,15 @@ static void fetch_next(MailDisplay *md)
&& (rd = (struct _remote_data *)e_dlist_remhead(&p->fetch_queue))) {
ctx = soup_context_get(rd->uri);
- rd->msg = msg = soup_message_new(ctx, SOUP_METHOD_GET);
- soup_context_unref(ctx);
+ rd->msg = msg = soup_message_new(ctx, SOUP_METHOD_GET);
+
+ if (ctx)
+ soup_context_unref(ctx);
+
soup_message_set_flags(msg, SOUP_MESSAGE_OVERWRITE_CHUNKS);
soup_message_add_handler(msg, SOUP_HANDLER_BODY_CHUNK, fetch_data, rd);
- soup_message_queue(msg, fetch_done, rd);
-
e_dlist_addtail(&p->fetch_active, (EDListNode *)rd);
+ soup_message_queue(msg, fetch_done, rd);
}
}