Bug #12198 --> bullet proof this code. return if we don't have a nsIURI instead of trying to dereference it. r=sspitzer

This commit is contained in:
mscott@netscape.com
1999-09-28 22:11:26 +00:00
parent 9661a1ee9f
commit 6688c57b29
2 changed files with 4 additions and 0 deletions

View File

@@ -2133,6 +2133,8 @@ nsWebShell::LoadURI(nsIURI * aUri,
CancelRefreshURITimers();
nsXPIDLCString scheme, CUriSpec;
if (!aUri) return NS_ERROR_NULL_POINTER;
rv = aUri->GetScheme(getter_Copies(scheme));
if (NS_FAILED(rv)) return rv;
rv = aUri->GetSpec(getter_Copies(CUriSpec));