Fix null pointer dereference causing startup crash.
authorAli Juma <ajuma@mozilla.com>
Mon, 06 Feb 2012 09:42:53 -0500
changeset 89075 43016f417f0bc2a1d22c4078ecbc2eb9eb02af00
parent 89074 d721b3df0c6bdd8e0ea83ec816b94453d13ca49b
child 89076 ea664069a4ff505b5591a0b7edb004048991e8a5
push id22242
push userkgupta@mozilla.com
push dateWed, 14 Mar 2012 15:19:09 +0000
treeherdermozilla-central@936ef50fa498 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone12.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Fix null pointer dereference causing startup crash.
gfx/layers/ipc/CompositorParent.cpp
--- a/gfx/layers/ipc/CompositorParent.cpp
+++ b/gfx/layers/ipc/CompositorParent.cpp
@@ -254,16 +254,19 @@ CompositorParent::TransformShadowTree(La
 void
 CompositorParent::AsyncRender()
 {
   if (mPaused || !mLayerManager) {
     return;
   }
 
   Layer* root = mLayerManager->GetRoot();
+  if (!root) {
+    return;
+  }
 
 /*
   ContainerLayer* container = root->AsContainerLayer();
   if (!container)
     return;
 
   FrameMetrics metrics = container->GetFrameMetrics();
     printf("FrameMetrics: mViewPort: X: %d, Y: %d, Width: %d, Height: %d ",