bug 704004 websockets null check of channel before calling close on it r=jduell

This commit is contained in:
Patrick McManus 2011-11-22 18:42:59 -05:00
parent 950276a2ca
commit defb404ca8

View File

@ -164,7 +164,8 @@ nsWebSocket::CloseConnection()
if (mReadyState == nsIMozWebSocket::CONNECTING) {
SetReadyState(nsIMozWebSocket::CLOSED);
mWebSocketChannel->Close(mClientReasonCode, mClientReason);
if (mWebSocketChannel)
mWebSocketChannel->Close(mClientReasonCode, mClientReason);
Disconnect();
return NS_OK;
}