aboutsummaryrefslogtreecommitdiff
path: root/src/subscribedialog.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-02-23 09:33:49 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-02-23 09:33:49 +0000
commit35101e45b4f2bdfd078e60da6a057ce15e07021d (patch)
tree36a4c5b3d4fba1ac304901a520614258b0cbbdb6 /src/subscribedialog.c
parent173536cf437d8fcb1ab34ec63d412d0bf693c721 (diff)
ignore non-ascii newsgroup names (fixes crash on Win32).
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1005 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/subscribedialog.c')
-rw-r--r--src/subscribedialog.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/subscribedialog.c b/src/subscribedialog.c
index 92e49b17..232cd3aa 100644
--- a/src/subscribedialog.c
+++ b/src/subscribedialog.c
@@ -408,7 +408,7 @@ static gboolean subscribe_create_branch(NewsGroupInfo *ginfo,
{
GtkTreeIter iter_;
GtkTreeIter parent;
- gchar *name = (gchar *)ginfo->name;
+ const gchar *name = ginfo->name;
gchar *parent_name;
gint count;
const gchar *count_str;
@@ -442,7 +442,7 @@ static gboolean subscribe_create_branch(NewsGroupInfo *ginfo,
}
gtk_tree_store_set(tree_store, &iter_,
- SUBSCRIBE_NAME, ginfo->name,
+ SUBSCRIBE_NAME, name,
SUBSCRIBE_NUM, count_str,
SUBSCRIBE_TYPE, type_str,
SUBSCRIBE_INFO, ginfo,
@@ -503,6 +503,9 @@ static void subscribe_dialog_set_list(const gchar *pattern, gboolean refresh)
NewsGroupInfo *ginfo = (NewsGroupInfo *)cur->data;
GtkTreeIter iter;
+ if (!ginfo->name || !is_ascii_str(ginfo->name))
+ continue;
+
if (g_slist_find_custom(subscribe_list, ginfo->name,
(GCompareFunc)g_ascii_strcasecmp)
!= NULL)