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

git-svn-id: svn://10.0.0.236/trunk@49248 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mscott%netscape.com
1999-09-28 22:11:26 +00:00
parent 3d4aa5c477
commit 82ff521b2b
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));