提交 3f292530 编写于 作者: A Adam Barth

Merge pull request #2156 from abarth/fix_empty_crash

Fix crash with empty rect
......@@ -54,6 +54,11 @@ void RasterizerMojo::Draw(uint64_t layer_tree_ptr,
scoped_ptr<compositor::LayerTree> layer_tree(
reinterpret_cast<compositor::LayerTree*>(layer_tree_ptr));
if (layer_tree->frame_size().isEmpty()) {
callback.Run();
return;
}
MGLResizeSurface(layer_tree->frame_size().width(),
layer_tree->frame_size().height());
SkCanvas* canvas = ganesh_canvas_.GetCanvas(0, layer_tree->frame_size());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册