diff options
author | Dan Vrátil <dvratil@redhat.com> | 2012-04-13 17:53:21 +0800 |
---|---|---|
committer | Dan Vrátil <dvratil@redhat.com> | 2012-04-13 17:53:21 +0800 |
commit | 2f530637b15a2a07bd1df1aabef91ffc4f26ddee (patch) | |
tree | 052d005b69d6c04291fd47fb98f81cd4b7b24078 /mail/e-mail-request.c | |
parent | 1ae02fa69cfc1acceb0c50fea9b64c18563ecd93 (diff) | |
download | gsoc2013-evolution-2f530637b15a2a07bd1df1aabef91ffc4f26ddee.tar.gz gsoc2013-evolution-2f530637b15a2a07bd1df1aabef91ffc4f26ddee.tar.zst gsoc2013-evolution-2f530637b15a2a07bd1df1aabef91ffc4f26ddee.zip |
Bug #673525 - Crash under efh_write_message()
Make sure the EMFormat* lives until EMailRequest is finished.
Diffstat (limited to 'mail/e-mail-request.c')
-rw-r--r-- | mail/e-mail-request.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mail/e-mail-request.c b/mail/e-mail-request.c index d440e675e0..49c5b5a47f 100644 --- a/mail/e-mail-request.c +++ b/mail/e-mail-request.c @@ -581,6 +581,11 @@ mail_request_finalize (GObject *object) request->priv->ret_mime_type = NULL; } + if (request->priv->efh) { + g_object_unref (request->priv->efh); + request->priv->efh = NULL; + } + G_OBJECT_CLASS (e_mail_request_parent_class)->finalize (object); } @@ -647,6 +652,9 @@ mail_request_send_async (SoupRequest *request, g_return_if_fail (emr->priv->efh); + /* Make sure the formatter lives until we are finished here */ + g_object_ref (emr->priv->efh); + result = g_simple_async_result_new (G_OBJECT (request), callback, user_data, mail_request_send_async); g_simple_async_result_run_in_thread (result, handle_mail_request, @@ -674,6 +682,9 @@ mail_request_send_async (SoupRequest *request, g_return_if_fail (emr->priv->efh); + /* Make sure the formatter lives until we are finished here */ + g_object_ref (emr->priv->efh); + result = g_simple_async_result_new (G_OBJECT (request), callback, user_data, mail_request_send_async); g_simple_async_result_run_in_thread (result, handle_http_request, |