diff options
Diffstat (limited to 'utils/nsurl.c')
-rw-r--r-- | utils/nsurl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/nsurl.c b/utils/nsurl.c index 9e19275cc..8431916be 100644 --- a/utils/nsurl.c +++ b/utils/nsurl.c @@ -1554,6 +1554,8 @@ nserror nsurl_get(const nsurl *url, nsurl_component parts, struct nsurl_component_lengths str_len = { 0, 0, 0, 0, 0, 0, 0, 0 }; enum nsurl_string_flags str_flags = 0; + assert(url != NULL); + /* Get the string length and find which parts of url need copied */ nsurl__get_string_data(&(url->components), parts, url_l, &str_len, &str_flags); @@ -1704,6 +1706,8 @@ const char *nsurl_access_leaf(const nsurl *url) const char *path; const char *leaf; + assert(url != NULL); + if (url->components.path == NULL) return ""; |