[evolution] Bug #674062 - Runtime warning from e_attachment_load_handle_error()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #674062 - Runtime warning from e_attachment_load_handle_error()
- Date: Tue, 24 Apr 2012 13:08:20 +0000 (UTC)
commit 80ee0ba6227dea6d7638d39cbb2aacefba683d85
Author: Milan Crha <mcrha redhat com>
Date: Tue Apr 24 15:07:46 2012 +0200
Bug #674062 - Runtime warning from e_attachment_load_handle_error()
mail/em-format-html-display.c | 2 --
widgets/misc/e-attachment.c | 6 ++++--
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index 4557a74..47dbba8 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -443,8 +443,6 @@ attachment_loaded (EAttachment *attachment,
shell = e_shell_get_default ();
window = e_shell_get_active_window (shell);
- if (!E_IS_SHELL_WINDOW (window))
- window = NULL;
e_attachment_load_handle_error (data->attachment, res, window);
diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c
index 31e0abf..087c55f 100644
--- a/widgets/misc/e-attachment.c
+++ b/widgets/misc/e-attachment.c
@@ -1941,7 +1941,7 @@ e_attachment_load_handle_error (EAttachment *attachment,
g_return_if_fail (E_IS_ATTACHMENT (attachment));
g_return_if_fail (G_IS_ASYNC_RESULT (result));
- g_return_if_fail (GTK_IS_WINDOW (parent));
+ g_return_if_fail (!parent || GTK_IS_WINDOW (parent));
if (e_attachment_load_finish (attachment, result, &error))
return;
@@ -1959,8 +1959,10 @@ e_attachment_load_handle_error (EAttachment *attachment,
}
/* Ignore cancellations. */
- if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+ g_error_free (error);
return;
+ }
file_info = e_attachment_get_file_info (attachment);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]