fix for #59421. sr=bienvenu. prevent the crash when saving a news message with a unicode file name.

the save still fails, but at least you don't crash.
This commit is contained in:
sspitzer%netscape.com 2000-11-30 21:59:01 +00:00
Родитель 6ffb7b4e78
Коммит 94c89be713
1 изменённых файлов: 5 добавлений и 1 удалений

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

@ -2162,7 +2162,11 @@ PRInt32 nsNNTPProtocol::BeginArticle()
nsCOMPtr <nsISupports> supports;
NS_NewIOFileStream(getter_AddRefs(supports), fileSpec,
PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE, 00700);
m_tempArticleStream = do_QueryInterface(supports);
nsresult rv;
m_tempArticleStream = do_QueryInterface(supports, &rv);
NS_ASSERTION(NS_SUCCEEDED(rv) && m_tempArticleStream,"failed to get article stream");
if (NS_FAILED(rv) || !m_tempArticleStream) return -1;
PRBool needDummyHeaders = PR_FALSE;
msgurl->GetAddDummyEnvelope(&needDummyHeaders);
if (needDummyHeaders)