From 7d83151d1adb03eaa28df9ae05d0d8e8fb7e7f54 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Thu, 22 Nov 2012 17:04:26 +0000 Subject: make nsurl_access() not assert with being passed a NULL url as it is assumed elsewhere this will never fail. --- utils/nsurl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/nsurl.c b/utils/nsurl.c index 18577b65d..eeaf202a7 100644 --- a/utils/nsurl.c +++ b/utils/nsurl.c @@ -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; } -- cgit v1.2.3