Index: Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp |
=================================================================== |
--- Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp (revision 94875) |
+++ Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp (working copy) |
@@ -563,6 +563,8 @@ |
CCLayerImpl* renderSurfaceLayer = renderSurfaceLayerList[surfaceIndex].get(); |
RenderSurfaceChromium* renderSurface = renderSurfaceLayer->renderSurface(); |
ASSERT(renderSurface); |
+ if (!renderSurface) |
+ continue; |
renderSurface->setSkipsDraw(true); |
@@ -964,6 +966,8 @@ |
CCLayerImpl* renderSurfaceLayer = renderSurfaceLayerList[surfaceIndex].get(); |
RenderSurfaceChromium* renderSurface = renderSurfaceLayer->renderSurface(); |
ASSERT(renderSurface); |
+ if (!renderSurface) |
+ continue; |
if (!renderSurface->layerList().size() || !renderSurface->drawOpacity()) |
continue; |
@@ -972,6 +976,8 @@ |
ASSERT(layerList.size()); |
for (unsigned layerIndex = 0; layerIndex < layerList.size(); ++layerIndex) { |
CCLayerImpl* ccLayerImpl = layerList[layerIndex].get(); |
+ if (!ccLayerImpl) |
nduca
2011/09/09 23:24:09
(drive by) How do we prevent this crap from happen
|
+ continue; |
if (ccLayerImpl->renderSurface() && ccLayerImpl->renderSurface() != renderSurface) |
continue; |
@@ -1067,6 +1073,9 @@ |
void LayerRendererChromium::drawLayer(CCLayerImpl* layer, RenderSurfaceChromium* targetSurface) |
{ |
+ if (!layer) |
+ return; |
+ |
if (layer->renderSurface() && layer->renderSurface() != targetSurface) { |
layer->renderSurface()->draw(layer->getDrawRect()); |
layer->renderSurface()->releaseContentsTexture(); |