diff options
-rw-r--r-- | mail/em-format-html-display.c | 2 | ||||
-rw-r--r-- | 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 4557a74ecd..47dbba8439 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 31e0abf330..087c55f9c5 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); |