Adding critical check for null.

removing unneded assignment to temp var.
This commit is contained in:
dougt%netscape.com 2000-04-24 06:08:48 +00:00
Родитель 2bac8b3ccc
Коммит b2d97a1c4d
1 изменённых файлов: 18 добавлений и 26 удалений

Просмотреть файл

@ -116,6 +116,8 @@ nsInstallFolder::nsInstallFolder(const nsString& aFolderID, const nsString& aRel
// if it already exists...
nsCOMPtr<nsILocalFile> dirCheck;
NS_NewLocalFile(aFolderID.ToNewCString(), getter_AddRefs(dirCheck));
if (dirCheck)
{
dirCheck->IsDirectory(&flagIsDir);
dirCheck->Exists(&flagExists);
if ( flagIsDir || !flagExists )
@ -139,7 +141,7 @@ nsInstallFolder::nsInstallFolder(const nsString& aFolderID, const nsString& aRel
}
}
}
}
nsInstallFolder::nsInstallFolder(nsInstallFolder& inFolder, const nsString& subString)
{
@ -291,17 +293,7 @@ nsInstallFolder::SetDirectoryPath(const nsString& aFolderID, const nsString& aRe
case 109: /////////////////////////////////////////////////////////// File URL
{
if (aRelativePath.IsEmpty())
{
mFileSpec = nsnull;
return;
}
nsCOMPtr<nsILocalFile> temp;
nsString tempFileURLString = aFolderID;
tempFileURLString += aRelativePath;
NS_NewLocalFile(aRelativePath.ToNewCString(), getter_AddRefs(temp));
mFileSpec = temp;