зеркало из https://github.com/mozilla/pjs.git
Fix crash when trying to save page source, though it still doesn't work (bug 15204)
This commit is contained in:
Родитель
507b4bd515
Коммит
2f2ecc749c
|
@ -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];
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче