diff --git a/netwerk/protocol/http/nsHttpTransaction.cpp b/netwerk/protocol/http/nsHttpTransaction.cpp index c66e36b9239..561af9a4477 100644 --- a/netwerk/protocol/http/nsHttpTransaction.cpp +++ b/netwerk/protocol/http/nsHttpTransaction.cpp @@ -1239,9 +1239,10 @@ nsHttpTransaction::DeleteSelfOnConsumerThread() LOG(("nsHttpTransaction::DeleteSelfOnConsumerThread [this=%x]\n", this)); PRBool val; - if (NS_SUCCEEDED(mConsumerTarget->IsOnCurrentThread(&val)) && val) + if (!mConsumerTarget || + (NS_SUCCEEDED(mConsumerTarget->IsOnCurrentThread(&val)) && val)) { delete this; - else { + } else { LOG(("proxying delete to consumer thread...\n")); nsCOMPtr event = new nsDeleteHttpTransaction(this); if (NS_FAILED(mConsumerTarget->Dispatch(event, NS_DISPATCH_NORMAL)))