Fixed null mScheme in 'SchemeIs' method. b=85981, r/a=gagan, sr=kin, a=asa-drivers

This commit is contained in:
cmanske%netscape.com 2001-06-15 03:32:59 +00:00
parent 18436aed08
commit 591c54146e

View File

@ -313,7 +313,7 @@ nsStdURL::SchemeIs(const char *i_Scheme, PRBool *o_Equals)
if (!i_Scheme) return NS_ERROR_NULL_POINTER;
// mScheme is guaranteed to be lower case.
if (*i_Scheme == *mScheme || *i_Scheme == (*mScheme - ('a' - 'A')) ) {
if ( mScheme && (*i_Scheme == *mScheme || *i_Scheme == (*mScheme - ('a' - 'A'))) ) {
*o_Equals = PL_strcasecmp(mScheme, i_Scheme) ? PR_FALSE : PR_TRUE;
} else {
*o_Equals = PR_FALSE;
@ -1025,7 +1025,8 @@ nsStdURL::GetFile(nsIFile * *aFile)
}
if ((path.CharAt(0) == '/' && path.CharAt(1) == '/')) {
// unc path
// unc path
#ifdef DEBUG_dougt
printf("+++ accessing UNC path\n");
#endif