Assert that the url exists before reducing its reference count. Thanks to Martin Bazley.

svn path=/trunk/netsurf/; revision=12865
This commit is contained in:
Michael Drake 2011-09-23 09:06:05 +00:00
parent e7c67e8bb8
commit 1385dea029

View File

@ -881,11 +881,11 @@ nsurl *nsurl_ref(nsurl *url)
/* exported interface, documented in nsurl.h */
void nsurl_unref(nsurl *url)
{
assert(url != NULL);
if (--url->count > 0)
return;
assert(url != NULL);
#ifdef NSURL_DEBUG
nsurl__dump(url);
#endif