Itseez/opencv — pull request #681 by jbohren (2013-03-20 20:56:07+00:00)
Title: Fixing segfault for near-zero-sized ellipses

Sometimes, `ellipse2Poly()` can be called with an ellipse of near-zero size. Currently, if this happens, no points are added to the polygon, and so the following line causes a segmentation fault:

```c++
if( pts.size() < 2 )
pts.push_back(pts[0]);
```

This patch replaces this unsafe code which makes any no-point or one-point polygon simply a zero-length line which goes from the center point to the center point.