diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2022-10-14 03:58:09 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2022-10-14 03:58:09 +0200 |
| commit | 6c329acfb888d9a9aefd8e1cae6d7162c053e70b (patch) | |
| tree | 095f95890377e87f987a3ccbf68a330ef9684941 | |
| parent | f2e52c2b511d2876f776ab42847c7aef05f3bcf5 (diff) | |
debug when context destroyed with remaining saved ctx
| -rw-r--r-- | src/vkvg_context.c | 2 | ||||
| -rw-r--r-- | src/vkvg_context_internal.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/vkvg_context.c b/src/vkvg_context.c index ea5b1f5..a7738b9 100644 --- a/src/vkvg_context.c +++ b/src/vkvg_context.c @@ -234,8 +234,6 @@ void _clear_context (VkvgContext ctx) { vkvg_context_save_t* cur = next; next = cur->pNext; _free_ctx_save (cur); - if (cur->pattern) - vkvg_pattern_destroy (cur->pattern); } //free additional stencil use in save/restore process if (ctx->savedStencils) { diff --git a/src/vkvg_context_internal.c b/src/vkvg_context_internal.c index 42ad96d..5342117 100644 --- a/src/vkvg_context_internal.c +++ b/src/vkvg_context_internal.c @@ -1311,6 +1311,8 @@ bool ptInTriangle(vec2 p, vec2 p0, vec2 p1, vec2 p2) { void _free_ctx_save (vkvg_context_save_t* sav){ if (sav->dashCount > 0) free (sav->dashes); + if (sav->pattern) + vkvg_pattern_destroy(sav->pattern); free (sav); } |