diff --git a/dom/media/MediaRecorder.cpp b/dom/media/MediaRecorder.cpp index 9311dc946c1..cc7739d73a3 100644 --- a/dom/media/MediaRecorder.cpp +++ b/dom/media/MediaRecorder.cpp @@ -639,7 +639,7 @@ private: mTrackUnionStream->AddListener(mEncoder); // Try to use direct listeners if possible DOMMediaStream* domStream = mRecorder->Stream(); - if (domStream) { + if (domStream && domStream->GetInputStream()) { mInputStream = domStream->GetInputStream()->AsSourceStream(); if (mInputStream) { mInputStream->AddDirectListener(mEncoder);