Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4815f98

Browse files
committed
Fix memory reservation for curve to line segment conversion.
svn path=/trunk/matplotlib/; revision=4988
1 parent 3ed2533 commit 4815f98

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/_path.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,7 @@ Py::Object _path_module::convert_path_to_polygons(const Py::Tuple& args)
11201120
double x, y;
11211121
unsigned code;
11221122

1123-
polygon.reserve(path.total_vertices());
1123+
polygon.reserve(path.total_vertices() * 2);
11241124

11251125
while ((code = curve.vertex(&x, &y)) != agg::path_cmd_stop)
11261126
{

0 commit comments

Comments
 (0)