From 32cfafe2168b79f590b70048deeef41da431993e Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 13 Jun 2012 10:51:44 +0200 Subject: [PATCH] g_cancellable_reset() doesn't like NULL cancellable --- camel/providers/imap/camel-imap-store.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index c2a4c23..fba76e7 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -842,7 +842,8 @@ imap_store_connect_sync (CamelService *service, !imap_auth_loop (service, cancellable, error)) { /* reset cancellable, in case it is cancelled, thus the disconnect is run */ - g_cancellable_reset (cancellable); + if (cancellable) + g_cancellable_reset (cancellable); camel_service_disconnect_sync ( service, TRUE, cancellable, NULL); return FALSE; @@ -1019,7 +1020,8 @@ done: if (local_error != NULL) { /* reset cancellable, in case it is cancelled, thus the disconnect is run */ - g_cancellable_reset (cancellable); + if (cancellable) + g_cancellable_reset (cancellable); camel_service_disconnect_sync ( service, TRUE, cancellable, NULL); g_propagate_error (error, local_error); -- 2.7.4