diff options
Diffstat (limited to 'src/vkvg_context.c')
| -rw-r--r-- | src/vkvg_context.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vkvg_context.c b/src/vkvg_context.c index 27979e1..c6fd714 100644 --- a/src/vkvg_context.c +++ b/src/vkvg_context.c @@ -1502,10 +1502,10 @@ void vkvg_restore(VkvgContext ctx) { ctx->textDirection = sav->textDirection; if (sav->pattern) { - if (sav->pattern != ctx->pattern) + if (sav->pattern != ctx->pattern) { _update_cur_pattern(ctx, sav->pattern); - else - vkvg_pattern_destroy(sav->pattern); + vkvg_pattern_reference(ctx->pattern); + } } else { ctx->curColor = sav->curColor; _update_cur_pattern(ctx, NULL); |