Skip to content

Commit 19fc8e9

Browse files
committed
Points counter must be positive
1 parent e3c6318 commit 19fc8e9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lottie/lottieitem.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,11 @@ void renderer::Polystar::updatePath(VPath &path, int frameNo)
11631163
path.reset();
11641164
VMatrix m;
11651165

1166+
if (!(points > 0)) {
1167+
vWarning << "The number of path points is below zero or NaN at all";
1168+
return;
1169+
}
1170+
11661171
if (mData->mPolyType == model::Polystar::PolyType::Star) {
11671172
path.addPolystar(points, innerRadius, outerRadius, innerRoundness,
11681173
outerRoundness, 0.0, 0.0, 0.0, mData->direction());

0 commit comments

Comments
 (0)