diff --git a/dom/media/MediaRecorder.cpp b/dom/media/MediaRecorder.cpp index 7506fd4eda27..32d4ef389dcb 100644 --- a/dom/media/MediaRecorder.cpp +++ b/dom/media/MediaRecorder.cpp @@ -455,8 +455,7 @@ public: size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const { - size_t amount = mEncoder->SizeOfExcludingThis(aMallocSizeOf); - return amount; + return (mEncoder ? mEncoder->SizeOfExcludingThis(aMallocSizeOf) : 0); }