make nsurl_access() not assert with being passed a NULL url as it is assumed elsewhere this will never fail.

This commit is contained in:
Vincent Sanders 2012-11-22 17:04:26 +00:00
parent 966fb9f215
commit 7d83151d1a
1 changed files with 3 additions and 1 deletions

View File

@ -1564,7 +1564,9 @@ bool nsurl_has_component(const nsurl *url, nsurl_component part)
/* exported interface, documented in nsurl.h */
const char *nsurl_access(const nsurl *url)
{
assert(url != NULL);
if (url == NULL) {
return NULL;
}
return url->string;
}