Changeset: 1f111fb90c8e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1f111fb90c8e
Modified Files:
geom/monetdb5/geom.c
Branch: Jun2016
Log Message:
Don't destroy geometry too early.
diffs (24 lines):
diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -2858,13 +2858,14 @@ wkbGetCoordinate(dbl *out, wkb **geom, i
}
gcs = GEOSGeom_getCoordSeq(geosGeometry);
+
+ if (gcs == NULL) {
+ GEOSGeom_destroy(geosGeometry);
+ throw(MAL, "geom.wkbGetCoordinate", "GEOSGeom_getCoordSeq
failed");
+ }
+
+ GEOSCoordSeq_getOrdinate(gcs, 0, *dimNum, out);
GEOSGeom_destroy(geosGeometry);
-
- if (gcs == NULL) {
- throw(MAL, "geom.wkbGetCoordinate", "GEOSGeom_getCoordSeq
failed");
- }
-
- GEOSCoordSeq_getOrdinate(gcs, 0, *dimNum, out);
/* gcs shouldn't be freed, it's internal to the GEOSGeom */
return MAL_SUCCEED;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list