Fix crash when trying to save page source, though it still doesn't work (bug 15204)

This commit is contained in:
pinkerton%netscape.com 2002-06-25 19:23:16 +00:00
Родитель 507b4bd515
Коммит 2f2ecc749c
4 изменённых файлов: 28 добавлений и 24 удалений

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

@ -833,12 +833,13 @@ void nsHeaderSniffer::PerformSave()
return;
nsCOMPtr<nsIMIMEInfo> mimeInfo;
mimeService->GetFromMIMEType(mContentType.get(), getter_AddRefs(mimeInfo));
if (!mimeInfo)
return;
PRUint32 extCount;
char** extList;
PRUint32 extCount = 0;
char** extList = nsnull;
mimeInfo->GetFileExtensions(&extCount, &extList);
if (extCount > 0) {
if (extCount > 0 && extList) {
defaultFileName += ".";
defaultFileName += extList[0];
}

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

@ -833,12 +833,13 @@ void nsHeaderSniffer::PerformSave()
return;
nsCOMPtr<nsIMIMEInfo> mimeInfo;
mimeService->GetFromMIMEType(mContentType.get(), getter_AddRefs(mimeInfo));
if (!mimeInfo)
return;
PRUint32 extCount;
char** extList;
PRUint32 extCount = 0;
char** extList = nsnull;
mimeInfo->GetFileExtensions(&extCount, &extList);
if (extCount > 0) {
if (extCount > 0 && extList) {
defaultFileName += ".";
defaultFileName += extList[0];
}

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

@ -833,12 +833,13 @@ void nsHeaderSniffer::PerformSave()
return;
nsCOMPtr<nsIMIMEInfo> mimeInfo;
mimeService->GetFromMIMEType(mContentType.get(), getter_AddRefs(mimeInfo));
if (!mimeInfo)
return;
PRUint32 extCount;
char** extList;
PRUint32 extCount = 0;
char** extList = nsnull;
mimeInfo->GetFileExtensions(&extCount, &extList);
if (extCount > 0) {
if (extCount > 0 && extList) {
defaultFileName += ".";
defaultFileName += extList[0];
}

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

@ -833,12 +833,13 @@ void nsHeaderSniffer::PerformSave()
return;
nsCOMPtr<nsIMIMEInfo> mimeInfo;
mimeService->GetFromMIMEType(mContentType.get(), getter_AddRefs(mimeInfo));
if (!mimeInfo)
return;
PRUint32 extCount;
char** extList;
PRUint32 extCount = 0;
char** extList = nsnull;
mimeInfo->GetFileExtensions(&extCount, &extList);
if (extCount > 0) {
if (extCount > 0 && extList) {
defaultFileName += ".";
defaultFileName += extList[0];
}