From 4f6a77d052bbe66e57e2343c53f1a8ceccefc779 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Bruyère Date: Wed, 16 Sep 2026 13:43:45 +0200 Subject: debug restore pattern reference --- src/vkvg_context.c | 6 +++--- 1 file 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); -- cgit v1.3.1-4-g156e