mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 16:22:00 +00:00
Bug 47263 - null check for top crasher (mOutputStream becomes null -- could be going through END_READ state twice).
This commit is contained in:
parent
5d1cbe00c6
commit
fe7c6ebabe
@ -62,10 +62,10 @@ nsFileTransport::nsFileTransport()
|
||||
mCancelStatus(NS_OK),
|
||||
mMonitor(nsnull),
|
||||
mStatus(NS_OK),
|
||||
mLoadAttributes(LOAD_NORMAL),
|
||||
mOffset(0),
|
||||
mTotalAmount(-1),
|
||||
mTransferAmount(-1),
|
||||
mLoadAttributes(LOAD_NORMAL),
|
||||
mBuffer(nsnull),
|
||||
mService(nsnull)
|
||||
{
|
||||
@ -513,8 +513,10 @@ nsFileTransport::Process(void)
|
||||
// of the data in the stream/file.
|
||||
mStatus = NS_BASE_STREAM_CLOSED;
|
||||
}
|
||||
mOutputStream->Flush();
|
||||
mOutputStream = null_nsCOMPtr();
|
||||
if (mOutputStream) {
|
||||
mOutputStream->Flush();
|
||||
mOutputStream = null_nsCOMPtr();
|
||||
}
|
||||
mInputStream = null_nsCOMPtr();
|
||||
|
||||
mSource = null_nsCOMPtr();
|
||||
|
Loading…
Reference in New Issue
Block a user