From: Christian Dywan Date: Mon, 13 Apr 2009 02:07:20 +0000 (+0200) Subject: Don't try to render "nothing" in completion, like an empty title X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=adec1c70935debda4be437a597c777bcf992f92e;p=midori Don't try to render "nothing" in completion, like an empty title --- diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c index 7405df47..86aa3c7b 100644 --- a/midori/midori-locationaction.c +++ b/midori/midori-locationaction.c @@ -521,11 +521,15 @@ midori_location_entry_render_text_cb (GtkCellLayout* layout, len = strlen (key); skey = g_malloc0 (len + 1); strncpy (skey, uri + (start - temp), len); - parts = g_strsplit (uri, skey, 2); - if (parts && parts[0] && parts[1]) - desc_uri = g_markup_printf_escaped ("%s%s%s", - parts[0], skey, parts[1]); - g_strfreev (parts); + if (skey && *skey && (parts = g_strsplit (uri, skey, 2))) + { + if (parts[0] && parts[1]) + { + desc_uri = g_markup_printf_escaped ("%s%s%s", + parts[0], skey, parts[1]); + g_strfreev (parts); + } + } g_free (skey); } g_free (temp);