Bug 630135 - No UI feedback when imapx connection fails
authorDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 20 Sep 2010 10:25:10 +0000 (11:25 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 20 Sep 2010 10:26:04 +0000 (11:26 +0100)
Don't call camel_operation_cancel(NULL). That has undesired effects.

Only call camel_operation_cancel(server->op) if it's non-NULL -- i.e. if the
parser thread had actually started up and set it.

camel/providers/imapx/camel-imapx-server.c

index 95ad01f..6a245a8 100644 (file)
@@ -4758,7 +4758,8 @@ imapx_server_dispose (GObject *object)
        QUEUE_UNLOCK (server);
 
        server->parser_quit = TRUE;
-       camel_operation_cancel (server->op);
+       if (server->op)
+               camel_operation_cancel (server->op);
 
        if (server->parser_thread)
                g_thread_join (server->parser_thread);