Skip to content

Commit

Permalink
Points counter must be positive
Browse files Browse the repository at this point in the history
  • Loading branch information
mymedia2 committed Feb 26, 2022
1 parent e3c6318 commit 19fc8e9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lottie/lottieitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1163,6 +1163,11 @@ void renderer::Polystar::updatePath(VPath &path, int frameNo)
path.reset();
VMatrix m;

if (!(points > 0)) {
vWarning << "The number of path points is below zero or NaN at all";
return;
}

if (mData->mPolyType == model::Polystar::PolyType::Star) {
path.addPolystar(points, innerRadius, outerRadius, innerRoundness,
outerRoundness, 0.0, 0.0, 0.0, mData->direction());
Expand Down

0 comments on commit 19fc8e9

Please sign in to comment.