Skip to content

Commit

Permalink
[cpp] Fix handling of degenerate clipping polygons, closes #2579
Browse files Browse the repository at this point in the history
  • Loading branch information
badlogic committed Jul 24, 2024
1 parent aca86fa commit 92b5b8a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spine-cpp/spine-cpp/src/spine/SkeletonClipping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,10 @@ bool SkeletonClipping::clip(float x1, float y1, float x2, float y2, float x3, fl
} else
originalOutput->setSize(originalOutput->size() - 2, 0);

if (originalOutput->size() < 6) {
originalOutput->clear();
return false;
}
return clipped;
}

Expand Down

0 comments on commit 92b5b8a

Please sign in to comment.