diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 9ec4a1f4631..50e0877ad32 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -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();