From: Alexander Butenko Date: Wed, 1 Jun 2011 22:21:51 +0000 (-0400) Subject: Return original URI if unescaping failed X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=243f93b70d61e0e35a8d6d60257cff1e6e06f8e1;p=midori Return original URI if unescaping failed The issue could be seen in the form of error messages: g_regex_replace_eval: assertion `string != NULL' failed --- diff --git a/midori/sokoke.c b/midori/sokoke.c index 4df529a0..eacd455e 100644 --- a/midori/sokoke.c +++ b/midori/sokoke.c @@ -926,6 +926,8 @@ sokoke_uri_unescape_string (const gchar* uri) { /* Preserve %20 for pasting URLs into other windows */ gchar* unescaped = g_uri_unescape_string (uri, "+"); + if (!unescaped) + return g_strdup (uri); gchar* spaced = sokoke_replace_variables (unescaped, " ", "%20", NULL); g_free (unescaped); return spaced;