From ae799e322ac20e44c8f509765b06891a407850de Mon Sep 17 00:00:00 2001 From: Anthony Jones Date: Wed, 27 Mar 2013 11:25:12 +1300 Subject: [PATCH] Bug 852251 - Check for null on CompositorChild::Get() --- dom/ipc/TabChild.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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();