Bug 1057855 - Fix error checking when calling nsZipArchive::GetItem(). r=smaug

This commit is contained in:
Shian-Yow Wu 2014-09-04 19:55:00 +02:00
parent ff44312e08
commit e41905a55a

View File

@ -4074,8 +4074,8 @@ ArrayBufferBuilder::mapToFileInPackage(const nsCString& aFile,
return rv;
}
nsZipItem* zipItem = zip->GetItem(aFile.get());
if (NS_FAILED(rv)) {
return rv;
if (!zipItem) {
return NS_ERROR_FILE_TARGET_DOES_NOT_EXIST;
}
// If file was added to the package as stored(uncompressed), map to the