Fix crash accessing RenderView's layer's backing when not composited
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Jan 2013 01:07:13 +0000 (01:07 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Jan 2013 01:07:13 +0000 (01:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=107203

Reviewed by Benjamin Poulain.

The RenderView isn't always layer-backed in WebKit1, so null-check the backing.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@140073 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerCompositor.cpp

index 67c1137..064e439 100644 (file)
@@ -1,3 +1,15 @@
+2013-01-17  Simon Fraser  <simon.fraser@apple.com>
+
+        Fix crash accessing RenderView's layer's backing when not composited
+        https://bugs.webkit.org/show_bug.cgi?id=107203
+
+        Reviewed by Benjamin Poulain.
+
+        The RenderView isn't always layer-backed in WebKit1, so null-check the backing.
+
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged):
+
 2013-01-16  Ryosuke Niwa  <rniwa@webkit.org>
 
         Remove NodeListsNodeData when it's no longer needed
index 8556185..7d56a51 100644 (file)
@@ -1206,7 +1206,7 @@ void RenderLayerCompositor::frameViewDidLayout()
 void RenderLayerCompositor::rootFixedBackgroundsChanged()
 {
     RenderLayerBacking* renderViewBacking = m_renderView->layer()->backing();
-    if (renderViewBacking->usingTileCache())
+    if (renderViewBacking && renderViewBacking->usingTileCache())
         setCompositingLayersNeedRebuild();
 }