Index: cc/resources/scoped_gpu_raster.cc |
diff --git a/cc/resources/scoped_gpu_raster.cc b/cc/resources/scoped_gpu_raster.cc |
index 2f5c5c9c3426a42eca7532cb8919611884a983d1..b816d1de3d19ce716b1561c57be212ba5bf9b99d 100644 |
--- a/cc/resources/scoped_gpu_raster.cc |
+++ b/cc/resources/scoped_gpu_raster.cc |
@@ -30,12 +30,14 @@ void ScopedGpuRaster::BeginGpuRaster() { |
gl->PushGroupMarkerEXT(0, "GpuRasterization"); |
class GrContext* gr_context = context_provider_->GrContext(); |
- gr_context->resetContext(); |
+ if (gr_context) |
+ gr_context->resetContext(); |
} |
void ScopedGpuRaster::EndGpuRaster() { |
class GrContext* gr_context = context_provider_->GrContext(); |
- gr_context->flush(); |
+ if (gr_context) |
+ gr_context->flush(); |
GLES2Interface* gl = context_provider_->ContextGL(); |