Skip to content

Instantly share code, notes, and snippets.

@fischman
Created June 11, 2012 22:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fischman/2913124 to your computer and use it in GitHub Desktop.
Save fischman/2913124 to your computer and use it in GitHub Desktop.
diff --git a/Source/WebKit/chromium/src/WebLayerTreeView.cpp b/Source/WebKit/chromium/src/WebLayerTreeView.cpp
index fed3db9..7de17fd 100644
--- a/Source/WebKit/chromium/src/WebLayerTreeView.cpp
+++ b/Source/WebKit/chromium/src/WebLayerTreeView.cpp
@@ -167,7 +167,10 @@ void WebLayerTreeView::finishAllRendering()
WebGraphicsContext3D* WebLayerTreeView::context()
{
- return GraphicsContext3DPrivate::extractWebGraphicsContext3D(m_private->layerTreeHost()->context()->context3D());
+ WebCore::CCGraphicsContext* c = m_private->layerTreeHost()->context();
+ if (!c)
+ return 0;
+ return GraphicsContext3DPrivate::extractWebGraphicsContext3D(c->context3D());
}
void WebLayerTreeView::loseCompositorContext(int numTimes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment