Bug 1138557 - Add null check to mLoadingSrc. r=karlt, a=lmandel
authorJW Wang <jwwang@mozilla.com>
Tue, 03 Mar 2015 02:14:00 -0500
changeset 249178 58b004077c10b901daaa26b0ba042fa546eb0d7b
parent 249177 8746f7ba56c9612b12c26a846b1400e02d4f9b24
child 249179 5d0326e1f387a2782d3a7f52092fbb6c50afd39b
push id970
push userjryans@gmail.com
push dateTue, 10 Mar 2015 15:54:18 +0000
reviewerskarlt, lmandel
bugs1138557
milestone37.0
Bug 1138557 - Add null check to mLoadingSrc. r=karlt, a=lmandel
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -3258,17 +3258,17 @@ void HTMLMediaElement::CheckProgress(boo
         ChangeDelayLoadStatus(true);
       }
     }
   }
 
   if (now - mDataTime >= TimeDuration::FromMilliseconds(STALL_MS)) {
     DispatchAsyncEvent(NS_LITERAL_STRING("stalled"));
 
-    if (IsMediaSourceURI(mLoadingSrc)) {
+    if (mLoadingSrc && IsMediaSourceURI(mLoadingSrc)) {
       ChangeDelayLoadStatus(false);
     }
 
     NS_ASSERTION(mProgressTimer, "detected stalled without timer");
     // Stop timer events, which prevents repeated stalled events until there
     // is more progress.
     StopProgress();
   }