]>
Commit | Line | Data |
---|---|---|
5984d1ff JP |
1 | From 4e828b3bd2d410151dc2574d084bed631dac42ca Mon Sep 17 00:00:00 2001 |
2 | From: Daniel McArdle <dmcardle@chromium.org> | |
3 | Date: Thu, 16 Apr 2020 20:18:47 +0000 | |
4 | Subject: [PATCH] [Backport] Fix for bug 1071327 | |
5 | ||
6 | Manual backport of patch originally reviewed on | |
7 | https://chromium-review.googlesource.com/c/chromium/src/+/2153325: | |
8 | Avoid nullptr dereference in RTCPeerConnectionHandler | |
9 | ||
10 | Bug: 1071327 | |
11 | Fixes: QTBUG-86752 | |
12 | Change-Id: Icf4189905dc5c95854b5af4b3e5e25e0607dd39e | |
13 | Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> | |
14 | --- | |
15 | ||
16 | diff --git a/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc b/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc | |
17 | index 5a68327..371f25c 100644 | |
18 | --- a/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc | |
19 | +++ b/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc | |
20 | @@ -2319,7 +2319,8 @@ | |
21 | ||
22 | void RTCPeerConnectionHandler::OnModifySctpTransport( | |
23 | blink::WebRTCSctpTransportSnapshot state) { | |
24 | - client_->DidModifySctpTransport(state); | |
25 | + if (client_) | |
26 | + client_->DidModifySctpTransport(state); | |
27 | } | |
28 | ||
29 | void RTCPeerConnectionHandler::OnModifyTransceivers( | |
30 | @@ -2446,7 +2447,8 @@ | |
31 | } | |
32 | ||
33 | void RTCPeerConnectionHandler::OnInterestingUsage(int usage_pattern) { | |
34 | - client_->DidNoteInterestingUsage(usage_pattern); | |
35 | + if (client_) | |
36 | + client_->DidNoteInterestingUsage(usage_pattern); | |
37 | } | |
38 | ||
39 | webrtc::SessionDescriptionInterface* |