Bug 1138771 - Ensure we don't deref a null pointer in assertion in GMPVideoDecoderParent::Shutdown(). r=edwin a=lmandel
authorChris Pearce <cpearce@mozilla.com>
Wed, 04 Mar 2015 23:20:45 +1300
changeset 250277 30cc597f157a
parent 250276 52600b8172cf
child 250278 a8aa24cf19a5
push id4535
push usercpearce@mozilla.com
push date2015-03-06 20:57 +0000
treeherdermozilla-beta@68707623b5a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersedwin, lmandel
bugs1138771
milestone37.0
Bug 1138771 - Ensure we don't deref a null pointer in assertion in GMPVideoDecoderParent::Shutdown(). r=edwin a=lmandel
dom/media/gmp/GMPVideoDecoderParent.cpp
--- a/dom/media/gmp/GMPVideoDecoderParent.cpp
+++ b/dom/media/gmp/GMPVideoDecoderParent.cpp
@@ -182,17 +182,17 @@ GMPVideoDecoderParent::Drain()
   return NS_OK;
 }
 
 // Note: Consider keeping ActorDestroy sync'd up when making changes here.
 nsresult
 GMPVideoDecoderParent::Shutdown()
 {
   LOGD(("%s: %p", __FUNCTION__, this));
-  MOZ_ASSERT(mPlugin->GMPThread() == NS_GetCurrentThread());
+  MOZ_ASSERT(!mPlugin || mPlugin->GMPThread() == NS_GetCurrentThread());
 
   if (mShuttingDown) {
     return NS_OK;
   }
   mShuttingDown = true;
 
   // Notify client we're gone!  Won't occur after Close()
   if (mCallback) {