Bug #623912 - SMTP::query_auth_types should not use NULL hash table
authorMilan Crha <mcrha@redhat.com>
Wed, 1 Sep 2010 08:26:02 +0000 (10:26 +0200)
committerMilan Crha <mcrha@redhat.com>
Wed, 1 Sep 2010 08:26:55 +0000 (10:26 +0200)
camel/providers/smtp/camel-smtp-transport.c

index 2c73ffe..4d855c6 100644 (file)
@@ -641,6 +641,11 @@ query_auth_types (CamelService *service, GError **error)
        if (!connect_to_server_wrapper (service, error))
                return NULL;
 
+       if (!transport->authtypes) {
+               smtp_disconnect (service, TRUE, NULL);
+               return NULL;
+       }
+
        types = g_list_copy (service->provider->authtypes);
        for (t = types; t; t = next) {
                authtype = t->data;