REGRESSION (r181423): Crash @ generatedcontent.org at com.apple.WebCore: WebCore...
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Mar 2015 20:28:33 +0000 (20:28 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Mar 2015 20:28:33 +0000 (20:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=142787

Reviewed by Eric Carlson.

Null check m_player before derefencing.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181662 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp

index 5efcc0d..5119c4b 100644 (file)
@@ -1,3 +1,15 @@
+2015-03-17  Jer Noble  <jer.noble@apple.com>
+
+        REGRESSION (r181423): Crash @ generatedcontent.org at com.apple.WebCore: WebCore::MediaPlayer::maximumDurationToCacheMediaTime const + 4
+        https://bugs.webkit.org/show_bug.cgi?id=142787
+
+        Reviewed by Eric Carlson.
+
+        Null check m_player before derefencing.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::parseAttribute):
+
 2015-03-17  Beth Dakin  <bdakin@apple.com>
 
         DOM mouse events have weird timing for force clickable elements in Safari 8.0.3 on 
index f1f6aba..4225cff 100644 (file)
@@ -2474,7 +2474,7 @@ void HTMLMediaElement::refreshCachedTime() const
 
 void HTMLMediaElement::invalidateCachedTime() const
 {
-    if (!m_player->maximumDurationToCacheMediaTime())
+    if (!m_player || !m_player->maximumDurationToCacheMediaTime())
         return;
 
 #if !LOG_DISABLED