summaryrefslogtreecommitdiff
path: root/utils/nsurl.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/nsurl.c')
-rw-r--r--utils/nsurl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/nsurl.c b/utils/nsurl.c
index 6a9296022..6675ee1a7 100644
--- a/utils/nsurl.c
+++ b/utils/nsurl.c
@@ -1713,6 +1713,11 @@ char *nsurl_access_utf8(const nsurl *url)
assert(url != NULL);
host = nsurl_get_component(url, NSURL_HOST);
+
+ if(host == NULL) {
+ return strdup(url->string);
+ }
+
if (idna_decode(lwc_string_data(host), lwc_string_length(host),
&idna_host, &idna_host_len) != NSERROR_OK) {
lwc_string_unref(host);