2007-10-23 [colin] 3.0.2cvs99
authorColin Leroy <colin@colino.net>
Tue, 23 Oct 2007 16:43:06 +0000 (16:43 +0000)
committerColin Leroy <colin@colino.net>
Tue, 23 Oct 2007 16:43:06 +0000 (16:43 +0000)
* src/news.c
Fix crash in some cases

ChangeLog
PATCHSETS
configure.ac
src/news.c

index fdf52eb0550d1b29aeae96c0de74f7633a555319..26a8e0a34043ad2745fbf86e996c10dad3339258 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-10-23 [colin]     3.0.2cvs99
+
+       * src/news.c
+               Fix crash in some cases
+
 2007-10-22 [colin]     3.0.2cvs98
 
        * src/common/socket.h
index 8b53eb1b13c26cd05937c39bdcc7cec085214669..9c155d30626be706b08d3468915e35c2412f0502 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.16.2.31 -r 1.16.2.32 src/prefs_customheader.c;  ) > 3.0.2cvs96.patchset
 ( cvs diff -u -r 1.101.2.42 -r 1.101.2.43 src/news.c;  ) > 3.0.2cvs97.patchset
 ( cvs diff -u -r 1.13.2.17 -r 1.13.2.18 src/common/socket.h;  cvs diff -u -r 1.9.2.24 -r 1.9.2.25 src/common/ssl.c;  ) > 3.0.2cvs98.patchset
+( cvs diff -u -r 1.101.2.43 -r 1.101.2.44 src/news.c;  ) > 3.0.2cvs99.patchset
index 0b0cd76dd889fc671ddc719bc7301c82bd38769e..ae779122ea2485e68bb2c98f250a7f0ec5b281ee 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=98
+EXTRA_VERSION=99
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 2901d0d77aa71c86740cde9d02b87bda19310e11..138d754d6643660df74c907ab1757e5ec5b648a9 100644 (file)
@@ -749,20 +749,15 @@ static gint news_select_group(Folder *folder, const gchar *group,
                        ok = nntp_threaded_group(folder, group, &info);
        }
 
-       if (ok == NEWSNNTP_NO_ERROR) {
+       if (ok == NEWSNNTP_NO_ERROR && info) {
+               session->group = g_strdup(group);
                *num = info->grp_first;
                *first = info->grp_first;
                *last = info->grp_last;
-       }
-
-       if (info)
                newsnntp_group_free(info);
-       
-       if (ok == NEWSNNTP_NO_ERROR)
-               session->group = g_strdup(group);
-       else
+       } else {
                log_warning(LOG_PROTOCOL, _("couldn't select group: %s\n"), group);
-
+       }
        return ok;
 }