Skip to content

Commit

Permalink
surf and pattern status check when affecting to context
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbruyere committed Mar 1, 2023
1 parent 84cf72d commit aabfb40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vkvg_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit aabfb40

Please sign in to comment.