fix crash cancelling fcc to imap folder, sr=mscott, patch suggested by laurentiu dumitrescu 206408

This commit is contained in:
bienvenu%nventure.com 2006-10-06 20:55:43 +00:00
Родитель cba6ca4f6e
Коммит 55c751ffa4
1 изменённых файлов: 8 добавлений и 3 удалений

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

@ -1652,9 +1652,14 @@ nsresult nsImapProtocol::SendData(const char * dataBuffer, PRBool aSuppressLoggi
else else
Log("SendData", nsnull, "Logging suppressed for this command (it probably contained authentication information)"); Log("SendData", nsnull, "Logging suppressed for this command (it probably contained authentication information)");
PRUint32 n; {
rv = m_outputStream->Write(dataBuffer, PL_strlen(dataBuffer), &n); // don't allow someone to close the stream/transport out from under us
// this can happen when the ui thread calls TellThreadToDie.
nsAutoCMonitor mon(this);
PRUint32 n;
if (m_outputStream)
rv = m_outputStream->Write(dataBuffer, PL_strlen(dataBuffer), &n);
}
if (NS_FAILED(rv)) if (NS_FAILED(rv))
{ {
Log("SendData", nsnull, "clearing IMAP_CONNECTION_IS_OPEN"); Log("SendData", nsnull, "clearing IMAP_CONNECTION_IS_OPEN");