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

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

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();