[BlackBerry] Add a null check for media implementation to fix a crash.
authorstaikos@webkit.org <staikos@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Aug 2012 14:14:01 +0000 (14:14 +0000)
committerstaikos@webkit.org <staikos@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Aug 2012 14:14:01 +0000 (14:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=93107

Reviewed by Rob Buis.

Fixes media/video-size.html.

* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintMediaSliderTrack): Add null check.

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

Source/WebCore/ChangeLog
Source/WebCore/platform/blackberry/RenderThemeBlackBerry.cpp

index 0f578849dc2c72307e4d4668fec9dd9934a9cf04..7fbe06dca17d837429c9d332801df2ad2bb1a67a 100644 (file)
@@ -1,3 +1,15 @@
+2012-08-03  George Staikos  <staikos@webkit.org>
+
+        [BlackBerry] Add a null check for media implementation to fix a crash.
+        https://bugs.webkit.org/show_bug.cgi?id=93107
+
+        Reviewed by Rob Buis.
+
+        Fixes media/video-size.html.
+
+        * platform/blackberry/RenderThemeBlackBerry.cpp:
+        (WebCore::RenderThemeBlackBerry::paintMediaSliderTrack): Add null check.
+
 2012-08-03  Yury Semikhatsky  <yurys@chromium.org>
 
         Unreviewed. Fixed WinCE compilation after r124589.
 2012-08-03  Yury Semikhatsky  <yurys@chromium.org>
 
         Unreviewed. Fixed WinCE compilation after r124589.
index 351a2b8b595efc73b46b97b09becc9742d0700e6..bbad4fb070b999a1598d7066b7578de9cb77bdbb 100644 (file)
@@ -899,7 +899,7 @@ bool RenderThemeBlackBerry::paintMediaSliderTrack(RenderObject* object, const Pa
     // FIXME: replace loaded with commented out one when buffer bug is fixed (see comment in
     // MediaPlayerPrivateMMrenderer::percentLoaded).
     // loaded = mediaElement->percentLoaded();
     // FIXME: replace loaded with commented out one when buffer bug is fixed (see comment in
     // MediaPlayerPrivateMMrenderer::percentLoaded).
     // loaded = mediaElement->percentLoaded();
-    if (mediaElement->player())
+    if (mediaElement->player() && mediaElement->player()->implementation())
         loaded = static_cast<MediaPlayerPrivate *>(mediaElement->player()->implementation())->percentLoaded();
     float position = mediaElement->duration() > 0 ? (mediaElement->currentTime() / mediaElement->duration()) : 0;
 
         loaded = static_cast<MediaPlayerPrivate *>(mediaElement->player()->implementation())->percentLoaded();
     float position = mediaElement->duration() > 0 ? (mediaElement->currentTime() / mediaElement->duration()) : 0;