Bug 1294142 - Fix TimeMarchesOn crash. r=jwwang, a=ritu
authorbechen <bechen@mozilla.com>
Mon, 15 Aug 2016 11:12:33 +0800
changeset 347761 b3c6b197d3efb90db27950d1d96dd5b52ea0a2d5
parent 347760 c12fc22f63b34294a11df81fd48600a09906fc01
child 347762 b29125ec5eb965e4db5c992f95e9d25bfcd499da
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwwang, ritu
bugs1294142
milestone50.0a2
Bug 1294142 - Fix TimeMarchesOn crash. r=jwwang, a=ritu
dom/html/TextTrackManager.cpp
--- a/dom/html/TextTrackManager.cpp
+++ b/dom/html/TextTrackManager.cpp
@@ -556,17 +556,17 @@ TextTrackManager::DispatchTimeMarchesOn(
 void
 TextTrackManager::TimeMarchesOn()
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   mTimeMarchesOnDispatched = false;
 
   // Early return if we don't have any TextTracks.
-  if (mTextTracks->Length() == 0) {
+  if (!mTextTracks || mTextTracks->Length() == 0) {
     return;
   }
 
   nsISupports* parentObject =
     mMediaElement->OwnerDoc()->GetParentObject();
   if (NS_WARN_IF(!parentObject)) {
     return;
   }