aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/mail-display.c10
2 files changed, 13 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 30f5853f50..36bd3749c8 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
2002-10-24 Jeffrey Stedfast <fejj@ximian.com>
Update the upgrade script to handle the new url format introduced
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);
}
}