summaryrefslogtreecommitdiff
path: root/src/mongo/db/geo/geoparser.cpp
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2014-10-13 20:02:53 -0400
committerAndrew Morrow <acm@mongodb.com>2014-10-15 20:51:30 -0400
commit27147aaf26aef235f8a65223e876adeea016886a (patch)
tree272e4cd3c8da2cf98f0953f98f6c2951cf5db73b /src/mongo/db/geo/geoparser.cpp
parent4b88d369d2489d1c6fac593ffeb1733d7bfc9c7b (diff)
downloadmongo-27147aaf26aef235f8a65223e876adeea016886a.tar.gz
SERVER-15629 Clear owned lines/polys correctly
Diffstat (limited to 'src/mongo/db/geo/geoparser.cpp')
-rw-r--r--src/mongo/db/geo/geoparser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/geo/geoparser.cpp b/src/mongo/db/geo/geoparser.cpp
index 8f057774e9f..ea228aca581 100644
--- a/src/mongo/db/geo/geoparser.cpp
+++ b/src/mongo/db/geo/geoparser.cpp
@@ -470,8 +470,8 @@ namespace mongo {
if (Array != coordElt.type())
return BAD_VALUE("MultiLineString coordinates must be an array");
+ out->lines.clear();
vector<S2Polyline*>& lines = out->lines.mutableVector();
- lines.clear();
BSONObjIterator it(coordElt.Obj());
@@ -496,8 +496,8 @@ namespace mongo {
if (Array != coordElt.type())
return BAD_VALUE("MultiPolygon coordinates must be an array");
+ out->polygons.clear();
vector<S2Polygon*>& polygons = out->polygons.mutableVector();
- polygons.clear();
BSONObjIterator it(coordElt.Obj());
// Iterate array