[Commits] [SCM] claws branch, gtk3, updated. 3.99.0-43-g2cd46df8f
paul at claws-mail.org
paul at claws-mail.org
Fri Mar 5 07:50:37 CET 2021
The branch, gtk3 has been updated
via 2cd46df8f5b924f9969b28aaa36ec73b616a1961 (commit)
from ad31bc5b69a542274bcf1e23726442caf8ee84b0 (commit)
Summary of changes:
src/gtk/gtkutils.c | 3 ++-
src/prefs_customheader.c | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 2cd46df8f5b924f9969b28aaa36ec73b616a1961
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 d2fe4344f..012b90841 100644
--- a/src/gtk/gtkutils.c
+++ b/src/gtk/gtkutils.c
@@ -1113,7 +1113,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 2715ba852..a9b033246 100644
--- a/src/prefs_customheader.c
+++ b/src/prefs_customheader.c
@@ -898,7 +898,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);
@@ -906,7 +906,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);
@@ -914,7 +914,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