> When I click on the subject bar at the top of the header pane
> (to sort on the subject name) I get a reproducible segfault:

The attached patch should fix the crash aspect of this,
bu but
I wonder how you're getting a NULL subject here at all.

Before you apply the patch, do me a favor.

First let's ensure that the error is coming from something in
~/.pan2/groups/groupname, rather than in headers being downloaded
when you enter the group: turn off ``get new headers on startup''
and ``get new headers when entering group'', _then_ load the group
and sort by subject.  If it still crashes, then mail me offlist
a bz2 copy of the matching ~/.pan2/groups/groupname so that I can
make it crash here too.

cheers,
Charles
--- header-pane.cc.bak  2006-05-05 19:46:59.000000000 -0500
+++ header-pane.cc      2006-05-05 19:47:00.000000000 -0500
@@ -90,7 +90,8 @@
     const char * pch = (const char*) pan_tree_store_peek_value 
(PAN_TREE_STORE(model), iter, COL_COLLATED_AUTHOR);
     if (!pch) {
       const Article * a (get_article (model, iter));
-      char * tmp = do_collate (a->author.c_str());
+      const char * in = a->author.empty() ? "" : a->author.c_str();
+      char * tmp = do_collate (in);
       pan_tree_store_set (PAN_TREE_STORE(model), iter, COL_COLLATED_AUTHOR, 
tmp, -1);
       g_free (tmp);
       pch = get_collated_author (model, iter);
@@ -104,7 +105,8 @@
     const char * pch = (const char*) pan_tree_store_peek_value 
(PAN_TREE_STORE(model), iter, COL_COLLATED_SUBJECT);
     if (!pch) {
       const Article * a (get_article (model, iter));
-      char * tmp = do_collate (a->subject.c_str());
+      const char * in = a->subject.empty() ? "" : a->author.c_str();
+      char * tmp = do_collate (in);
       pan_tree_store_set (PAN_TREE_STORE(model), iter, COL_COLLATED_SUBJECT, 
tmp, -1);
       g_free (tmp);
       pch = get_collated_subject (model, iter);
_______________________________________________
Pan-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/pan-users

Reply via email to