Bug 1880338: null-check child ptr in WebTransport shutdown r=necko-reviewers,valentin

Differential Revision: https://phabricator.services.mozilla.com/D201849
This commit is contained in:
Randell Jesup 2024-02-14 20:54:15 +00:00
Родитель fd40c69c47
Коммит b6d9e456cb
1 изменённых файлов: 4 добавлений и 2 удалений

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

@ -445,8 +445,10 @@ void WebTransport::RejectWaitingConnection(nsresult aRv) {
// these steps.
if (mState == WebTransportState::CLOSED ||
mState == WebTransportState::FAILED) {
mChild->Shutdown(true);
mChild = nullptr;
if (mChild) {
mChild->Shutdown(true);
mChild = nullptr;
}
// Cleanup should have been called, which means Ready has been
// rejected and pulls resolved
return;