mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 11575. Null check after pulling URI out of a resource. a=chofmann
This commit is contained in:
parent
0091d03cb8
commit
65c3c63e2c
@ -775,6 +775,10 @@ ServiceImpl::UnregisterResource(nsIRDFResource* aResource)
|
||||
#endif
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
NS_ASSERTION(uri != nsnull, "resource has no URI");
|
||||
if (! uri)
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
PLHashEntry** hep = PL_HashTableRawLookup(mResources, (*mResources->keyHash)(uri), uri);
|
||||
NS_ASSERTION(*hep != nsnull, "resource wasn't registered");
|
||||
if (! *hep)
|
||||
|
Loading…
Reference in New Issue
Block a user