Bug 902339 - Null check mImageHost in ImageLayerComposite before trying to access it. r=nrc, a=akeybl
authorMatt Woodrow <mwoodrow@mozilla.com>
Mon, 12 Aug 2013 12:11:09 +1200
changeset 153817 bd54805253112bc1bebe249d1cf79eed28374508
parent 153816 438013112c967058862c689663814d3ef26cd82a
child 153818 1613919512453cf5109ae7d3668acc41830d3e96
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnrc, akeybl
bugs902339
milestone25.0a2
Bug 902339 - Null check mImageHost in ImageLayerComposite before trying to access it. r=nrc, a=akeybl
gfx/layers/composite/ImageLayerComposite.cpp
--- a/gfx/layers/composite/ImageLayerComposite.cpp
+++ b/gfx/layers/composite/ImageLayerComposite.cpp
@@ -130,18 +130,19 @@ ImageLayerComposite::ComputeEffectiveTra
       SnapTransform(local, sourceRect, nullptr) *
       SnapTransformTranslation(aTransformToSurface, nullptr);
   ComputeEffectiveTransformForMaskLayer(aTransformToSurface);
 }
 
 CompositableHost*
 ImageLayerComposite::GetCompositableHost()
 {
-  if (mImageHost->IsAttached())
+  if (mImageHost && mImageHost->IsAttached()) {
     return mImageHost.get();
+  }
 
   return nullptr;
 }
 
 void
 ImageLayerComposite::CleanupResources()
 {
   if (mImageHost) {