From 2209855fdde84a82d1a77c74ad27e87271fbfe96 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Thu, 10 Jun 2021 11:33:57 +0900 Subject: [PATCH] common canvas: ++ exception handling. canvas update won't be performed if it's on drawing condition nor zero paints. Change-Id: Ifb05ed0dc27e052d3d35c45c1a4a75cab3c31446 --- src/lib/tvgCanvasImpl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/tvgCanvasImpl.h b/src/lib/tvgCanvasImpl.h index cce790e..11fe8b9 100644 --- a/src/lib/tvgCanvasImpl.h +++ b/src/lib/tvgCanvasImpl.h @@ -82,7 +82,7 @@ struct Canvas::Impl Result update(Paint* paint, bool force) { - if (!renderer) return Result::InsufficientCondition; + if (paints.count == 0 || drawing || !renderer) return Result::InsufficientCondition; Array clips; auto flag = RenderUpdateFlag::None; -- 2.7.4