From: wwp Date: Wed, 6 Oct 2021 07:53:47 +0000 (+0200) Subject: Fix CID 1491379: dereference before null check. X-Git-Tag: 3.19.0~105 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=8f03bca61aca398d2fb3733bde7c17990aab174e Fix CID 1491379: dereference before null check. --- diff --git a/src/addrcustomattr.c b/src/addrcustomattr.c index a28e8c5cc..1293db275 100644 --- a/src/addrcustomattr.c +++ b/src/addrcustomattr.c @@ -363,7 +363,8 @@ static void custom_attr_window_add_attr(void) { gchar *new_attr = gtk_editable_get_chars(GTK_EDITABLE(custom_attr_window.add_entry), 0, -1); - g_strstrip(new_attr); + if (new_attr) + g_strstrip(new_attr); if (new_attr && *new_attr) { GtkListStore *list_store = GTK_LIST_STORE(gtk_tree_view_get_model (GTK_TREE_VIEW(custom_attr_window.attr_list)));