From feda6bcbc26d82378e7e6a5340fa3f1861d97be9 Mon Sep 17 00:00:00 2001 From: lpogic Date: Mon, 14 Apr 2025 19:31:07 +0200 Subject: [PATCH] Added null check in Paint::Impl:clip issue: https://github.com/thorvg/thorvg/issues/3404 --- src/renderer/tvgPaint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/tvgPaint.h b/src/renderer/tvgPaint.h index d085e0cf..30312704 100644 --- a/src/renderer/tvgPaint.h +++ b/src/renderer/tvgPaint.h @@ -163,7 +163,7 @@ namespace tvg Result clip(Paint* clp) { - if (PAINT(clp)->parent) return Result::InsufficientCondition; + if (clp && PAINT(clp)->parent) return Result::InsufficientCondition; if (clipper) PAINT(clipper)->unref(clipper != clp); clipper = clp; if (clp) {