netsurf: branch master updated. 7d83151d1adb03eaa28df9ae05d0d8e8fb7e7f54

NetSurf Browser Project (Commit Mailer) no-reply at netsurf-browser.org
Thu Nov 22 17:04:55 GMT 2012


Gitweb links:

...log http://git.netsurf-browser.org/netsurf.git/shortlog/7d83151d1adb03eaa28df9ae05d0d8e8fb7e7f54
...commit http://git.netsurf-browser.org/netsurf.git/commit/7d83151d1adb03eaa28df9ae05d0d8e8fb7e7f54
...tree http://git.netsurf-browser.org/netsurf.git/tree/7d83151d1adb03eaa28df9ae05d0d8e8fb7e7f54

The branch, master has been updated
       via  7d83151d1adb03eaa28df9ae05d0d8e8fb7e7f54 (commit)
      from  966fb9f215915567d44cff97a73cf3730dd8c431 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/7d83151d1adb03eaa28df9ae05d0d8e8fb7e7f54
commit 7d83151d1adb03eaa28df9ae05d0d8e8fb7e7f54
Author: Vincent Sanders <vince at netsurf-browser.org>
Commit: Vincent Sanders <vince at netsurf-browser.org>

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

diff --git a/utils/nsurl.c b/utils/nsurl.c
index 18577b6..eeaf202 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;
 }


-----------------------------------------------------------------------

Summary of changes:
 utils/nsurl.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/utils/nsurl.c b/utils/nsurl.c
index 18577b6..eeaf202 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;
 }


-- 
NetSurf Browser



More information about the netsurf-commits mailing list