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

Skip to content

Commit 812e132

Browse files
committed
Fix segfault in Agg backend
svn path=/trunk/matplotlib/; revision=7420
1 parent f7d3900 commit 812e132

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/_backend_agg.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,9 +1270,11 @@ RendererAgg::draw_path_collection(const Py::Tuple& args) {
12701270
_VERBOSE("RendererAgg::draw_path_collection");
12711271
args.verify_length(12);
12721272

1273-
GCAgg gc(args[0], dpi);
1273+
Py::Object gc_obj = args[0];
1274+
GCAgg gc(gc_obj, dpi);
12741275
agg::trans_affine master_transform = py_to_agg_transformation_matrix(args[1].ptr());
1275-
PathListGenerator paths(args[2]);
1276+
Py::SeqBase<Py::Object> path = args[2];
1277+
PathListGenerator path_generator(path);
12761278
Py::SeqBase<Py::Object> transforms_obj = args[3];
12771279
Py::Object offsets_obj = args[4];
12781280
agg::trans_affine offset_trans = py_to_agg_transformation_matrix(args[5].ptr());
@@ -1283,7 +1285,6 @@ RendererAgg::draw_path_collection(const Py::Tuple& args) {
12831285
Py::SeqBase<Py::Int> antialiaseds = args[10];
12841286
// We don't actually care about urls for Agg, so just ignore it.
12851287
// Py::SeqBase<Py::Object> urls = args[11];
1286-
PathListGenerator path_generator(paths);
12871288

12881289
try {
12891290
_draw_path_collection_generic<PathListGenerator, 0, 1>

0 commit comments

Comments
 (0)