[Commits] [SCM] claws branch, master, updated. 3.17.8-26-gd03db8c67
paul at claws-mail.org
paul at claws-mail.org
Fri Mar 5 07:51:25 CET 2021
The branch, master has been updated
via d03db8c67b5765aff7b80b7446ebe74ffc40e782 (commit)
from 67de7a4db562991a672ea426909f58f5d528d071 (commit)
Summary of changes:
src/gtk/gtkutils.c | 3 ++-
src/prefs_customheader.c | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit d03db8c67b5765aff7b80b7446ebe74ffc40e782
Author: paul <paul at claws-mail.org>
Date: Fri Mar 5 06:50:32 2021 +0000
better fix for debian bug #983778
diff --git a/src/gtk/gtkutils.c b/src/gtk/gtkutils.c
index 7ffcbb371..272a5c3c4 100644
--- a/src/gtk/gtkutils.c
+++ b/src/gtk/gtkutils.c
@@ -1090,7 +1090,8 @@ GtkWidget *xface_get_from_header(const gchar *o_xface)
static gboolean xpm_xface_init = TRUE;
gchar xface[2048];
- cm_return_if_fail(sizeof(xface) < 0);
+ if (o_xface == NULL)
+ return NULL;
strncpy(xface, o_xface, sizeof(xface) - 1);
xface[sizeof(xface) - 1] = '\0';
diff --git a/src/prefs_customheader.c b/src/prefs_customheader.c
index c60328bfb..93fcd8d75 100644
--- a/src/prefs_customheader.c
+++ b/src/prefs_customheader.c
@@ -908,7 +908,7 @@ static gboolean prefs_custom_header_selected(GtkTreeSelection *selector,
ENTRY_SET_TEXT(customhdr.hdr_entry, ch->name);
ENTRY_SET_TEXT(customhdr.val_entry, ch->value);
- if (!g_strcmp0("Face",ch->name)) {
+ if (!g_strcmp0("Face",ch->name) && ch->value != NULL) {
preview = GTK_IMAGE(face_get_from_header (ch->value));
pixbuf = gtk_image_get_pixbuf(preview);
gtk_image_set_from_pixbuf (GTK_IMAGE(customhdr.preview), pixbuf);
@@ -916,7 +916,7 @@ static gboolean prefs_custom_header_selected(GtkTreeSelection *selector,
g_object_ref_sink (G_OBJECT(preview));
}
#if HAVE_LIBCOMPFACE
-else if (!g_strcmp0("X-Face", ch->name)) {
+ else if (!g_strcmp0("X-Face", ch->name) && ch->value != NULL) {
preview = GTK_IMAGE(xface_get_from_header(ch->value));
pixbuf = gtk_image_get_pixbuf(preview);
gtk_image_set_from_pixbuf (GTK_IMAGE(customhdr.preview), pixbuf);
@@ -924,7 +924,7 @@ else if (!g_strcmp0("X-Face", ch->name)) {
g_object_ref_sink (G_OBJECT(preview));
}
#endif
-else {
+ else {
gtk_widget_hide(customhdr.preview);
}
return TRUE;
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list