Commit 219bdb98 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky Committed by OpenCV Buildbot

Merge pull request #681 from jbohren-forks:fix-ellipse-segfault

parents 87563c66 a7a0f92e
...@@ -890,8 +890,10 @@ void ellipse2Poly( Point center, Size axes, int angle, ...@@ -890,8 +890,10 @@ void ellipse2Poly( Point center, Size axes, int angle,
pts.push_back(pt); pts.push_back(pt);
} }
if( pts.size() < 2 ) // If there are no points, it's a zero-size polygon
pts.push_back(pts[0]); if( pts.size() < 2) {
pts.assign(2,center);
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment