提交 535eb308 编写于 作者: A Adam Barth

Don't crash when RasterizerMojo::Draw happens without a context

If we don't have a context, we can't draw, so bail out early.
上级 240e2c50
......@@ -46,6 +46,10 @@ void RasterizerMojo::ConnectToRasterizer (
void RasterizerMojo::Draw(uint64_t layer_tree_ptr,
const DrawCallback& callback) {
TRACE_EVENT0("flutter", "RasterizerMojo::Draw");
if (!context_) {
callback.Run();
return;
}
scoped_ptr<compositor::LayerTree> layer_tree(
reinterpret_cast<compositor::LayerTree*>(layer_tree_ptr));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册