From 0606140495ea3682ea89a34506c803de818c0bf1 Mon Sep 17 00:00:00 2001 From: Chris Pearce Date: Mon, 15 Dec 2014 15:30:20 +1300 Subject: [PATCH] Bug 1111387 - Nullcheck mTaskQueue in TrackBuffer::QueueInitializeDecoder, as we can shutdown in between dispatching and running the task that calls QueueInitializeDecoder. r=cajbir --- dom/media/mediasource/TrackBuffer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dom/media/mediasource/TrackBuffer.cpp b/dom/media/mediasource/TrackBuffer.cpp index 793da5a2e2de..bd66b51bc68c 100644 --- a/dom/media/mediasource/TrackBuffer.cpp +++ b/dom/media/mediasource/TrackBuffer.cpp @@ -348,6 +348,10 @@ TrackBuffer::NewDecoder() bool TrackBuffer::QueueInitializeDecoder(SourceBufferDecoder* aDecoder) { + if (NS_WARN_IF(!mTaskQueue)) { + return false; + } + RefPtr task = NS_NewRunnableMethodWithArg(this, &TrackBuffer::InitializeDecoder,