From: Colin Leroy Date: Thu, 8 Oct 2015 17:08:42 +0000 (+0200) Subject: Fix null pointer dereference X-Git-Tag: 3.13.0~15 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=542c66f3f813801b9eeab84432d2e01e4a890aee Fix null pointer dereference --- diff --git a/src/addr_compl.c b/src/addr_compl.c index 44303a6a2..61d158b67 100644 --- a/src/addr_compl.c +++ b/src/addr_compl.c @@ -187,7 +187,9 @@ static gint weight_addr_match(const address_entry* addr) gint a_weight = addr->address ? strlen(addr->address) : n_weight; gchar* match = NULL; - match = strcasestr(addr->name, g_completion_prefix); + if (addr->name) + match = strcasestr(addr->name, g_completion_prefix); + if (match != NULL) { if (match == addr->name) n_weight = -4;