From 94a2d2364589c4a4795101187dab722f227a324a Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 17 Mar 2008 20:35:31 +0000 Subject: fix use of reserve() as revealed by _GLIBCXX_DEBUG git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3149 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/libgnomecanvasmm/libgnomecanvasmm/line.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/line.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/line.cc index 5b12c69ba6..9c3bf6f4a5 100644 --- a/libs/libgnomecanvasmm/libgnomecanvasmm/line.cc +++ b/libs/libgnomecanvasmm/libgnomecanvasmm/line.cc @@ -40,7 +40,9 @@ Points::Points(size_type nbpoints) Points::Points(GnomeCanvasPoints *castitem) : points_(castitem),owned_(false) { - reserve(points_->num_points); + while (size() < points_->num_points) { + push_back (Art::Point()); + } //GnomeCanvasPoints has an array of doubles, used 2 at a time: int i = 0; -- cgit v1.2.3