From 3da4948c0fc1f2c21b163f0ec456b2d99c881258 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 7 Sep 2013 12:31:19 -0400 Subject: Miscellaneous cleanups. --- mail/em-composer-utils.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'mail/em-composer-utils.c') diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index d8d9eb7496..0926363ad2 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -1027,10 +1027,14 @@ em_utils_composer_print_cb (EMsgComposer *composer, g_object_unref (operation); - if (error) { - if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) - g_warning ("%s: Failed to run print operation: %s", G_STRFUNC, error->message); - g_clear_error (&error); + if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { + g_error_free (error); + + } else if (error != NULL) { + g_warning ( + "%s: Failed to run print operation: %s", + G_STRFUNC, error->message); + g_error_free (error); } #else EMailParser *parser; -- cgit v1.2.3