aboutsummaryrefslogtreecommitdiff
path: root/src/summaryview.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-06-10 04:52:07 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-06-10 04:52:07 +0000
commit48f1078ba5251ebe3bdd07765c94d1f38bc87900 (patch)
tree2da9e680142746e637997db8878aef021b9083a4 /src/summaryview.c
parent7767bbd587b22cdbf3be3362fb32dedb1185ea4c (diff)
fixed possible crash when sorted by From/To/Subject.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@328 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/summaryview.c')
-rw-r--r--src/summaryview.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/summaryview.c b/src/summaryview.c
index 973794a5..34e758eb 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -4740,6 +4740,9 @@ static gint func_name(GtkTreeModel *model, \
gtk_tree_model_get(model, a, S_COL_MSG_INFO, &msginfo_a, -1); \
gtk_tree_model_get(model, b, S_COL_MSG_INFO, &msginfo_b, -1); \
\
+ if (!msginfo_a || !msginfo_b) \
+ return 0; \
+ \
if (msginfo_a->var_name == NULL) \
return -(msginfo_b->var_name != NULL); \
if (msginfo_b->var_name == NULL) \
@@ -4762,6 +4765,9 @@ static gint summary_cmp_by_subject(GtkTreeModel *model, \
gtk_tree_model_get(model, a, S_COL_MSG_INFO, &msginfo_a, -1); \
gtk_tree_model_get(model, b, S_COL_MSG_INFO, &msginfo_b, -1); \
\
+ if (!msginfo_a || !msginfo_b) \
+ return 0; \
+ \
if (msginfo_a->subject == NULL) \
return -(msginfo_b->subject != NULL); \
if (msginfo_b->subject == NULL) \