Skip to content

Commit

Permalink
Check if clipping shape's worldpath exists
Browse files Browse the repository at this point in the history
Adds an additional check so we don't pass a nullptr into Renderer.addPath.

Diffs=
69cffe900 Check if clipping shape's worldpath exists (#7956)

Co-authored-by: Philip Chung <[email protected]>
  • Loading branch information
philter and philter committed Aug 27, 2024
1 parent 14d13c3 commit 5737f90
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a134ab6564748353fa4278483f91fe784b0b9c0a
69cffe900faeb0241d20ea8ece3f5cfc5f1563a5
7 changes: 6 additions & 1 deletion src/shapes/clipping_shape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ void ClippingShape::update(ComponentDirt value)
{
if (!shape->isEmpty())
{
m_RenderPath->addPath(shape->pathComposer()->worldPath(), identity);
auto path = shape->pathComposer()->worldPath();
if (path == nullptr)
{
continue;
}
m_RenderPath->addPath(path, identity);
m_ClipRenderPath = m_RenderPath.get();
}
}
Expand Down

0 comments on commit 5737f90

Please sign in to comment.