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

Unified Diff: Source/core/html/track/TextTrackCue.cpp

Issue 17002002: TextTrackCue should check for non-NULL cue list pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated more comments from aaron Created 7 years, 6 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-disabled-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/track/TextTrackCue.cpp
diff --git a/Source/core/html/track/TextTrackCue.cpp b/Source/core/html/track/TextTrackCue.cpp
index ddf2b9ac145fe97ff770dd01b3d12f6a3b09a7cc..b0c3d4ea26f0ee6795dff00031f5d0f4463e7c4d 100644
--- a/Source/core/html/track/TextTrackCue.cpp
+++ b/Source/core/html/track/TextTrackCue.cpp
@@ -479,8 +479,11 @@ void TextTrackCue::setText(const String& text)
int TextTrackCue::cueIndex()
{
- if (m_cueIndex == invalidCueIndex)
- m_cueIndex = track()->cues()->getCueIndex(this);
+ if (m_cueIndex == invalidCueIndex) {
+ TextTrackCueList* cues = track()->cues();
+ if (cues)
+ m_cueIndex = cues->getCueIndex(this);
+ }
return m_cueIndex;
}
« no previous file with comments | « LayoutTests/media/track/track-disabled-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698