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 fdf52eb..26a8e0a 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 8b53eb1..9c155d3 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 0b0cd76..ae77912 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 2901d0d..138d754 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;
 }