Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1289)

Unified Diff: content/browser/media/session/media_session_impl.cc

Issue 2733843003: Fix a crash when receiving PAUSE action but no service is routed (Closed)
Patch Set: addressed comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/media/session/media_session_impl_service_routing_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/session/media_session_impl.cc
diff --git a/content/browser/media/session/media_session_impl.cc b/content/browser/media/session/media_session_impl.cc
index c3025c1661a655fb7b0bbc1149b2cab8cc111d71..f5069844108a35e99fcc2157494113f37dbbac71 100644
--- a/content/browser/media/session/media_session_impl.cc
+++ b/content/browser/media/session/media_session_impl.cc
@@ -646,7 +646,7 @@ void MediaSessionImpl::DidReceiveAction(
// https://crbug.com/596516.
if (blink::mojom::MediaSessionAction::PAUSE == action) {
RenderFrameHost* rfh_of_routed_service =
- routed_service_->GetRenderFrameHost();
+ routed_service_ ? routed_service_->GetRenderFrameHost() : nullptr;
for (const auto& player : normal_players_) {
if (player.observer->GetRenderFrameHost() != rfh_of_routed_service)
player.observer->OnSuspend(player.player_id);
« no previous file with comments | « no previous file | content/browser/media/session/media_session_impl_service_routing_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698