]> spindle.queued.net Git - midori/commitdiff
Return original URI if unescaping failed
authorAlexander Butenko <a.butenka@gmail.com>
Wed, 1 Jun 2011 22:21:51 +0000 (18:21 -0400)
committerChristian Dywan <christian@twotoasts.de>
Wed, 1 Jun 2011 22:40:44 +0000 (00:40 +0200)
The issue could be seen in the form of error messages:

g_regex_replace_eval: assertion `string != NULL' failed

midori/sokoke.c

index 4df529a0e749ddee0b6b738ae98b7a1b2efd47cc..eacd455e86003a6077df654b1e0883d463fc2bdd 100644 (file)
@@ -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;