From 535afcb092ca75891b292470522b860a7369ecb3 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Tue, 8 Dec 2015 12:51:50 -0800 Subject: [PATCH] Improve the crash fix in rasterizer_mojo The previous version can still crash if we try to draw between the time when we initialize context_ and when we actually make the MGL context current. --- sky/shell/gpu/mojo/rasterizer_mojo.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sky/shell/gpu/mojo/rasterizer_mojo.cc b/sky/shell/gpu/mojo/rasterizer_mojo.cc index 66a38d044..10a87d371 100644 --- a/sky/shell/gpu/mojo/rasterizer_mojo.cc +++ b/sky/shell/gpu/mojo/rasterizer_mojo.cc @@ -46,7 +46,7 @@ void RasterizerMojo::ConnectToRasterizer ( void RasterizerMojo::Draw(uint64_t layer_tree_ptr, const DrawCallback& callback) { TRACE_EVENT0("flutter", "RasterizerMojo::Draw"); - if (!context_) { + if (!MGLGetCurrentContext()) { callback.Run(); return; } -- GitLab