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

Unified Diff: Source/core/html/HTMLMediaElement.cpp

Issue 1224083013: Gracefully handle track-less elements on updating track selection. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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 | « LayoutTests/media/track/track-language-preference-no-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index e905c8905d3cdb9f0a85e36d437d9eaacd134618..29a67a7b11065fab209b7ad7b989329a26b8ae6c 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -3287,7 +3287,8 @@ void HTMLMediaElement::automaticTrackSelectionForUpdatedUserPreference()
// If a track is set to 'showing' post performing automatic track selection,
// set closed captions state to visible to update the CC button and display the track.
- m_closedCaptionsVisible = m_textTracks->hasShowingTracks();
+ if (m_textTracks)
+ m_closedCaptionsVisible = m_textTracks->hasShowingTracks();
updateTextTrackDisplay();
}
« no previous file with comments | « LayoutTests/media/track/track-language-preference-no-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698