From 32ba859650040622a50873fecc710fda7900b595 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Fri, 19 Aug 2016 16:03:14 -0700 Subject: [PATCH] Only attempt to draw in the rasterizer if a valid layer tree is received. (#2958) --- sky/shell/gpu/direct/rasterizer_direct.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sky/shell/gpu/direct/rasterizer_direct.cc b/sky/shell/gpu/direct/rasterizer_direct.cc index 713fd7b46..36f710b99 100644 --- a/sky/shell/gpu/direct/rasterizer_direct.cc +++ b/sky/shell/gpu/direct/rasterizer_direct.cc @@ -114,6 +114,10 @@ void RasterizerDirect::Draw( } void RasterizerDirect::DoDraw(std::unique_ptr layer_tree) { + if (layer_tree == nullptr) { + return; + } + // There is no way for the compositor to know how long the layer tree // construction took. Fortunately, the layer tree does. Grab that time // for instrumentation. -- GitLab