From 3a87c8d166c936ef222e0d90379e9333a727c855 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 4 May 2009 23:32:41 -0400 Subject: Fix an error extracting URIs from local attachments. --- widgets/misc/e-attachment-store.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'widgets/misc/e-attachment-store.c') diff --git a/widgets/misc/e-attachment-store.c b/widgets/misc/e-attachment-store.c index 0b6e5a2baa..9d0fe6d21e 100644 --- a/widgets/misc/e-attachment-store.c +++ b/widgets/misc/e-attachment-store.c @@ -818,6 +818,25 @@ e_attachment_store_get_uris_async (EAttachmentStore *store, uri_context->attachment_list = attachment_list; + /* If we got them all then we're done. */ + if (attachment_list == NULL) { + GSimpleAsyncResult *simple; + gchar **uris; + + /* Steal the result. */ + simple = uri_context->simple; + uri_context->simple = NULL; + + /* And the URI list. */ + uris = uri_context->uris; + uri_context->uris = NULL; + + g_simple_async_result_set_op_res_gpointer (simple, uris, NULL); + g_simple_async_result_complete_in_idle (simple); + attachment_store_uri_context_free (uri_context); + return; + } + /* Any remaining attachments in the list should have MIME parts * only, so we need to save them all to a temporary directory. * We use a directory so the files can retain their basenames. */ -- cgit v1.2.3