2011-09-18 [colin] 3.7.10cvs17
[claws.git] / src / news.c
index 032210cfc1c03b27ea8e4d6a0da0a78ef8a73e5a..3f0e0e7104d5305e1ab6d10d897a040e7e3ff278 100644 (file)
@@ -367,7 +367,11 @@ static Session *news_session_new_for_folder(Folder *folder)
        session = news_session_new(folder, ac->nntp_server, port, userid, passwd);
 #endif
 
-       r = nntp_threaded_mode_reader(folder);
+       if (session != NULL)
+               r = nntp_threaded_mode_reader(folder);
+       else
+               r = NEWSNNTP_ERROR_CONNECTION_REFUSED;
+
        if (r != NEWSNNTP_NO_ERROR) {
            if (r == NEWSNNTP_WARNING_REQUEST_AUTHORIZATION_USERNAME) {
                /*