[evolution/gnome-3-16] Bug 750202 - Crash under shell_source_invoke_authenticate_cb()



commit 7ca28e26b52e4d305ffc850cb634f59336cf4a3f
Author: Milan Crha <mcrha redhat com>
Date:   Mon Jun 1 11:01:35 2015 +0200

    Bug 750202 - Crash under shell_source_invoke_authenticate_cb()

 shell/e-shell.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 9be1d5f..348fd34 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -672,7 +672,7 @@ shell_source_invoke_authenticate_cb (GObject *source_object,
 
        if (!e_source_invoke_authenticate_finish (source, result, &error)) {
                /* Can be cancelled only if the shell is disposing/disposed */
-               if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+               if (error && !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
                        EAlert *alert;
 
                        g_return_if_fail (E_IS_SHELL (shell));
@@ -710,7 +710,7 @@ shell_trust_prompt_done_cb (GObject *source_object,
 
        if (!e_trust_prompt_run_for_source_finish (source, result, &response, &error)) {
                /* Can be cancelled only if the shell is disposing/disposed */
-               if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+               if (error && !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
                        EAlert *alert;
 
                        g_return_if_fail (E_IS_SHELL (shell));
@@ -757,7 +757,7 @@ shell_credentials_prompt_done_cb (GObject *source_object,
        if (e_credentials_prompter_prompt_finish (E_CREDENTIALS_PROMPTER (source_object), result, &source, 
&credentials, &error)) {
                e_source_invoke_authenticate (source, credentials, shell->priv->cancellable,
                        shell_source_invoke_authenticate_cb, shell);
-       } else if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+       } else if (error && !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
                EAlert *alert;
 
                g_return_if_fail (E_IS_SHELL (shell));
@@ -945,7 +945,7 @@ shell_get_last_credentials_required_arguments_cb (GObject *source_object,
        if (!e_source_get_last_credentials_required_arguments_finish (source, result, &reason,
                &certificate_pem, &certificate_errors, &op_error, &error)) {
                /* Can be cancelled only if the shell is disposing/disposed */
-               if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+               if (error && !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
                        EAlert *alert;
 
                        g_return_if_fail (E_IS_SHELL (shell));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]