diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-07-17 20:44:52 +0100 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-10-24 15:12:56 +0100 |
commit | 920cb0571d93f956385e193389dd1f564efc5304 (patch) | |
tree | 10517c1a8ee2fca5822f017d9f7de4601c286e07 /utils/nsurl.c | |
parent | 6afda499c290bea17fe2bcf5fcd257a1770528cf (diff) | |
download | netsurf-920cb0571d93f956385e193389dd1f564efc5304.tar.gz netsurf-920cb0571d93f956385e193389dd1f564efc5304.tar.bz2 |
Check we've obtained the host string
Diffstat (limited to 'utils/nsurl.c')
-rw-r--r-- | utils/nsurl.c | 5 |
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); |