2009-06-04 Pierre d'Herbemont <pdherbemont@apple.com>
[WebKit-https.git] / WebCore / html / HTMLMediaElement.cpp
index 348abf0..6ad0653 100644 (file)
@@ -1295,6 +1295,10 @@ PassRefPtr<TimeRanges> HTMLMediaElement::buffered() const
 
 PassRefPtr<TimeRanges> HTMLMediaElement::played() const
 {
+    if (!m_playedTimeRanges) {
+        // We are not yet loaded
+        return TimeRanges::create();
+    }
     if (m_playing) {
         float time = currentTime();
         if (m_lastSeekTime < time)