Bug 852251 - Check for null on CompositorChild::Get()

This commit is contained in:
Anthony Jones 2013-03-27 11:25:12 +13:00
parent 25d2864073
commit ae799e322a

View File

@ -2104,10 +2104,15 @@ TabChild::InitRenderingState()
if (id != 0) {
// Pushing layers transactions directly to a separate
// compositor context.
PCompositorChild* compositorChild = CompositorChild::Get();
if (!compositorChild) {
NS_WARNING("failed to get CompositorChild instance");
return false;
}
shadowManager =
CompositorChild::Get()->SendPLayersConstructor(be, id,
&be,
&maxTextureSize);
compositorChild->SendPLayersConstructor(be, id,
&be,
&maxTextureSize);
} else {
// Pushing transactions to the parent content.
shadowManager = remoteFrame->SendPLayersConstructor();