Bug 774084 - Fix a crash in nsBuiltinDecoder::GetSeekable. r=kinetik a=lsblakk
authorPaul Adenot <paul@paul.cx>
Sun, 15 Jul 2012 10:57:41 -0700
changeset 102351 7119a45e0fea7fcdabdf383bb1f35647a4b5fc51
parent 102350 719ca729259e4b865ed99a95da7526c99cded94c
child 102352 2454d9517b7b9c7156c39d68d6cb845f776b4ad8
push idunknown
push userunknown
push dateunknown
reviewerskinetik, lsblakk
bugs774084
milestone16.0a2
Bug 774084 - Fix a crash in nsBuiltinDecoder::GetSeekable. r=kinetik a=lsblakk
content/media/nsBuiltinDecoder.cpp
--- a/content/media/nsBuiltinDecoder.cpp
+++ b/content/media/nsBuiltinDecoder.cpp
@@ -951,17 +951,17 @@ nsresult nsBuiltinDecoder::GetSeekable(n
 
   if (IsSeekable()) {
     double end = IsInfinite() ? std::numeric_limits<double>::infinity()
                               : initialTime + GetDuration();
     aSeekable->Add(initialTime, end);
     return NS_OK;
   }
 
-  if (mDecoderStateMachine->IsSeekableInBufferedRanges()) {
+  if (mDecoderStateMachine && mDecoderStateMachine->IsSeekableInBufferedRanges()) {
     return GetBuffered(aSeekable);
   } else {
     // The stream is not seekable using only buffered ranges, and is not
     // seekable. Don't allow seeking (return no ranges in |seekable|).
     return NS_OK;
   }
 }