projects
/
profile
/
ivi
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87563c6
)
Fixing segfault for near-zero-sized ellipses
author
Jonathan Bohren
<jbo@jhu.edu>
Wed, 20 Mar 2013 20:49:59 +0000
(16:49 -0400)
committer
Jonathan Bohren
<jbo@jhu.edu>
Wed, 20 Mar 2013 20:51:48 +0000
(16:51 -0400)
modules/core/src/drawing.cpp
patch
|
blob
|
history
diff --git
a/modules/core/src/drawing.cpp
b/modules/core/src/drawing.cpp
index
8850c6e
..
a6d5287
100644
(file)
--- a/
modules/core/src/drawing.cpp
+++ b/
modules/core/src/drawing.cpp
@@
-890,8
+890,10
@@
void ellipse2Poly( Point center, Size axes, int angle,
pts.push_back(pt);
}
- if( pts.size() < 2 )
- pts.push_back(pts[0]);
+ // If there are no points, it's a zero-size polygon
+ if( pts.size() < 2) {
+ pts.assign(2,center);
+ }
}