diff --git a/src/renderer/tvgPaint.cpp b/src/renderer/tvgPaint.cpp index d5a70c0e..d9a57241 100644 --- a/src/renderer/tvgPaint.cpp +++ b/src/renderer/tvgPaint.cpp @@ -464,7 +464,7 @@ Result Paint::clip(std::unique_ptr clipper) noexcept Result Paint::composite(std::unique_ptr target, CompositeMethod method) noexcept { //TODO: remove. Keep this for the backward compatibility - if (method == CompositeMethod::ClipPath) return clip(std::move(target)); + if (target && method == CompositeMethod::ClipPath) return clip(std::move(target)); auto p = target.release(); if (pImpl->composite(this, p, method)) return Result::Success;