mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-10 06:34:01 +00:00
renderer: ++null check
fixed a Duplicate example crash, regression by:
f06127ab93
This commit is contained in:
parent
03b36cea7b
commit
3cb7aecb6a
1 changed files with 2 additions and 2 deletions
|
@ -125,8 +125,8 @@ struct Text::Impl
|
|||
if (!load()) return nullptr;
|
||||
|
||||
//transform the gradient coordinates based on the final scaled font.
|
||||
if (P(paint)->flag & RenderUpdateFlag::Gradient) {
|
||||
auto fill = P(paint)->rs.fill;
|
||||
auto fill = P(paint)->rs.fill;
|
||||
if (fill && P(paint)->flag & RenderUpdateFlag::Gradient) {
|
||||
auto scale = 1.0f / loader->scale;
|
||||
if (fill->type() == Type::LinearGradient) {
|
||||
P(static_cast<LinearGradient*>(fill))->x1 *= scale;
|
||||
|
|
Loading…
Add table
Reference in a new issue