[Commits] [SCM] claws branch, master, updated. 3.17.8-33-gfe607dfd5

mones at claws-mail.org mones at claws-mail.org
Wed Mar 17 00:04:34 CET 2021


The branch, master has been updated
       via  fe607dfd50a3d9f91cc2a756d41c19a835e27197 (commit)
      from  c86f5c99c5745f44a1b2d9799f160e916f532655 (commit)

Summary of changes:
 src/summaryview.c | 3 +++
 1 file changed, 3 insertions(+)


- Log -----------------------------------------------------------------
commit fe607dfd50a3d9f91cc2a756d41c19a835e27197
Author: Ricardo Mones <ricardo at mones.org>
Date:   Wed Mar 17 00:01:55 2021 +0100

    Fix segfault invoking function from python code
    
    When using python code is possible to add new menu items invoking module
    functions. Since they're added on-the-fly, these items can't be included
    in the logic which enables or disables menu entries according UI status.
    Hence the functions need checking what's really available instead of
    relying on the inability of users to not invoke the funcion through UI.
    
    There's probably more functions which need similar fixes, though, this
    one just appeared when trying to convert startup example to python3.
    
    Thread 1 "claws-mail" received signal SIGSEGV, Segmentation fault.
    0x0000000000583efa in summary_mark_as_read (summaryview=0xd9dc70) at summaryview.c:4179
    4179            if ((summaryview->folder_item->total_msgs == (gint)g_list_length(GTK_CMCLIST(ctree)->selection) &&

diff --git a/src/summaryview.c b/src/summaryview.c
index 03399b145..cb0d768c9 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -4205,6 +4205,9 @@ void summary_mark_as_read(SummaryView *summaryview)
 	if (summary_is_locked(summaryview))
 		return;
 
+	if (!summaryview->folder_item)
+		return;
+
 	if ((summaryview->folder_item->total_msgs == (gint)g_list_length(GTK_CMCLIST(ctree)->selection) &&
 	     summaryview->folder_item->total_msgs > 1) &&
 	    !summary_mark_all_read_confirm(TRUE))

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list