Bug 1043426 - Don't crash when failing to upload apply a maskon a container layer. r=Bas

This commit is contained in:
Nicolas Silva 2014-08-01 15:53:12 +02:00
parent 152e8a83e3
commit 6cb31479a7
2 changed files with 5 additions and 0 deletions

View File

@ -530,6 +530,10 @@ ContainerRender(ContainerT* aContainer,
LayerManagerComposite::AutoAddMaskEffect autoMaskEffect(aContainer->GetMaskLayer(),
effectChain,
!aContainer->GetTransform().CanDraw2D());
if (autoMaskEffect.Failed()) {
NS_WARNING("Failed to apply a mask effect.");
return;
}
aContainer->AddBlendModeEffect(effectChain);
effectChain.mPrimaryEffect = new EffectRenderTarget(surface);

View File

@ -184,6 +184,7 @@ public:
bool aIs3D = false);
~AutoAddMaskEffect();
bool Failed() const { return !mCompositable; }
private:
CompositableHost* mCompositable;
};