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

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: 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 | « no previous file | 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 feddf703d61798d5e37d42342ca1af9d5568615a..dcf9b1fe844b702c80bf001c71fe645233a60484 100644
--- a/Source/core/html/track/TextTrackCue.cpp
+++ b/Source/core/html/track/TextTrackCue.cpp
@@ -480,8 +480,10 @@ void TextTrackCue::setText(const String& text)
int TextTrackCue::cueIndex()
{
- if (m_cueIndex == invalidCueIndex)
- m_cueIndex = track()->cues()->getCueIndex(this);
+ if (m_cueIndex == invalidCueIndex) {
+ if (TextTrackCueList* cues = track()->cues())
scherkus (not reviewing) 2013/06/14 00:28:00 I'm not sure if this is common Blink style, but it
Matthew Heaney (Chromium) 2013/06/21 19:27:39 I modified the code to match the coding style from
+ m_cueIndex = cues->getCueIndex(this);
+ }
return m_cueIndex;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698