From aabfb40464b83702bdfc0cfe5520d6519bd6dd17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Sun, 30 Oct 2022 07:57:26 +0100 Subject: [PATCH] surf and pattern status check when affecting to context --- src/vkvg_context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vkvg_context.c b/src/vkvg_context.c index a7738b97..deee2d0c 100644 --- a/src/vkvg_context.c +++ b/src/vkvg_context.c @@ -1043,7 +1043,7 @@ void vkvg_set_source_rgba (VkvgContext ctx, float r, float g, float b, float a) _update_cur_pattern (ctx, NULL); } void vkvg_set_source_surface(VkvgContext ctx, VkvgSurface surf, float x, float y){ - if (ctx->status) + if (ctx->status || surf->status) return; RECORD(ctx, VKVG_CMD_SET_SOURCE_SURFACE, x, y, surf); ctx->pushConsts.source.x = x; @@ -1052,7 +1052,7 @@ void vkvg_set_source_surface(VkvgContext ctx, VkvgSurface surf, float x, float y ctx->pushCstDirty = true; } void vkvg_set_source (VkvgContext ctx, VkvgPattern pat){ - if (ctx->status) + if (ctx->status || pat->status) return; RECORD(ctx, VKVG_CMD_SET_SOURCE, pat); _update_cur_pattern (ctx, pat);