Bug 1151611 - Null check PDM::Create to fix bustage. CLOSED TREE
authorMatt Woodrow <mwoodrow@mozilla.com>
Tue, 28 Apr 2015 15:58:13 +1200
changeset 271212 fafcc7f4f663c2af3a9515d9cbff092f6af54db5
parent 271211 7362533abe5ae0e90c87f58d28b4bb00655a3b6f
child 271213 36c4d774fa03afdd1da2740a3f772c5c621c707a
push id4830
push userjlund@mozilla.com
push dateMon, 29 Jun 2015 20:18:48 +0000
treeherdermozilla-beta@4c2175bb0420 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1151611
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1151611 - Null check PDM::Create to fix bustage. CLOSED TREE
dom/media/fmp4/MP4Reader.cpp
--- a/dom/media/fmp4/MP4Reader.cpp
+++ b/dom/media/fmp4/MP4Reader.cpp
@@ -84,19 +84,25 @@ MP4Reader::IsVideoAccelerated(LayersBack
   config.mMediaTime = 0;
   config.mDisplay = config.mImage = nsIntSize(64, 64);
   config.mExtraData = new MediaByteBuffer();
   config.mExtraData->AppendElements(sTestExtraData, 40);
 
   PlatformDecoderModule::Init();
 
   nsRefPtr<PlatformDecoderModule> platform = PlatformDecoderModule::Create();
+  if (!platform) {
+    return false;
+  }
 
   nsRefPtr<MediaDataDecoder> decoder =
     platform->CreateDecoder(config, nullptr, nullptr, aBackend, nullptr);
+  if (!decoder) {
+    return false;
+  }
   nsresult rv = decoder->Init();
   NS_ENSURE_SUCCESS(rv, false);
 
   bool result = decoder->IsHardwareAccelerated();
 
   decoder->Shutdown();
 
   return result;