commit 572802d05824402bdb55ebd149f4e2d21d8230f7
parent a8df3ae48ad5732018934b378abb11a022735c5e
Author: Ricardo Mones <ricardo@mones.org>
Date: Thu, 4 Dec 2014 16:02:57 +0100
Fix crash opening folder (Debian bug #771737)
See https://bugs.debian.org/771737 for details.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/addr_compl.c b/src/addr_compl.c
@@ -183,7 +183,7 @@ static gint addr_completion_func(const gchar *needle, const gchar *haystack,
*/
static gint weight_addr_match(const address_entry* addr)
{
- gint n_weight = strlen(addr->name);
+ gint n_weight = addr->name ? strlen(addr->name): 0;
gint a_weight = addr->address ? strlen(addr->address) : n_weight;
gchar* match = NULL;