From 243f93b70d61e0e35a8d6d60257cff1e6e06f8e1 Mon Sep 17 00:00:00 2001 From: Alexander Butenko Date: Wed, 1 Jun 2011 18:21:51 -0400 Subject: [PATCH] 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 --- midori/sokoke.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.39.5