[Commits] [SCM] claws branch, master, updated. 3.15.0-91-ge00bcd4

mones at claws-mail.org mones at claws-mail.org
Tue Jul 11 10:07:51 CEST 2017


The branch, master has been updated
       via  e00bcd42492ba0c7eaa909e8830832af3380ec5e (commit)
      from  cd5ee29a8178584ad47a5b4ef7048d98237b410e (commit)

Summary of changes:
 src/compose.c |   20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit e00bcd42492ba0c7eaa909e8830832af3380ec5e
Author: Ricardo Mones <ricardo at mones.org>
Date:   Tue Jul 11 10:06:20 2017 +0200

    Check for NULL buttons also here
    
    Thanks Andrej for the suggestion!

diff --git a/src/compose.c b/src/compose.c
index d17a16d..21e690a 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -8472,10 +8472,22 @@ static void compose_set_privacy_system_cb(GtkWidget *widget, gpointer data)
 
 	cm_menu_set_sensitive_full(compose->ui_manager, "Menu/Options/Sign", can_sign);
 	cm_menu_set_sensitive_full(compose->ui_manager, "Menu/Options/Encrypt", can_encrypt);
-	gtk_widget_set_sensitive(compose->toolbar->privacy_sign_btn, can_sign);
-	gtk_widget_set_sensitive(compose->toolbar->privacy_encrypt_btn, can_encrypt);
-	gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(compose->toolbar->privacy_sign_btn), can_sign ? compose->use_signing : FALSE);
-	gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(compose->toolbar->privacy_encrypt_btn), can_encrypt ? compose->use_encryption : FALSE);
+	if (compose->toolbar->privacy_sign_btn != NULL) {
+		gtk_widget_set_sensitive(
+			GTK_WIDGET(compose->toolbar->privacy_sign_btn),
+			can_sign);
+		gtk_toggle_tool_button_set_active(
+			GTK_TOGGLE_TOOL_BUTTON(compose->toolbar->privacy_sign_btn),
+			can_sign ? compose->use_signing : FALSE);
+	}
+	if (compose->toolbar->privacy_encrypt_btn != NULL) {
+		gtk_widget_set_sensitive(
+			GTK_WIDGET(compose->toolbar->privacy_encrypt_btn),
+			can_encrypt);
+		gtk_toggle_tool_button_set_active(
+			GTK_TOGGLE_TOOL_BUTTON(compose->toolbar->privacy_encrypt_btn),
+			can_encrypt ? compose->use_encryption : FALSE);
+	}
 }
 
 static void compose_update_privacy_system_menu_item(Compose * compose, gboolean warn)

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list