pan-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pan-users] Re: [0.95] Reproducible segfault when sorting on article


From: Charles Kerr
Subject: Re: [Pan-users] Re: [0.95] Reproducible segfault when sorting on article name
Date: Mon, 08 May 2006 11:21:08 -0500
User-agent: Mozilla Thunderbird 1.0.8-1.4.1 (X11/20060420)

walt wrote:

I see that 0.96 already has this patch, and it's behavior
is slightly different but no better, alas:

Ha! Well, let's try again.  Here's a patch against 0.96.

--- pan/gui/header-pane.cc.bak  2006-05-08 11:19:05.000000000 -0500
+++ pan/gui/header-pane.cc      2006-05-08 11:19:14.000000000 -0500
@@ -90,8 +90,7 @@
     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));
-      const char * in = a->author.empty() ? "" : a->author.c_str();
-      char * tmp = do_collate (in);
+      char * tmp = a->author.empty() ? g_strdup("") : 
do_collate(a->author.c_str());
       pan_tree_store_set (PAN_TREE_STORE(model), iter, COL_COLLATED_AUTHOR, 
tmp, -1);
       g_free (tmp);
       pch = get_collated_author (model, iter);
@@ -105,8 +104,7 @@
     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));
-      const char * in = a->subject.empty() ? "" : a->subject.c_str();
-      char * tmp = do_collate (in);
+      char * tmp = a->subject.empty() ? g_strdup("") : 
do_collate(a->subject.c_str());
       pan_tree_store_set (PAN_TREE_STORE(model), iter, COL_COLLATED_SUBJECT, 
tmp, -1);
       g_free (tmp);
       pch = get_collated_subject (model, iter);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]