[GRASS-SVN] r34468 - grass/branches/develbranch_6/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Nov 24 02:13:55 EST 2008


Author: martinl
Date: 2008-11-24 02:13:53 -0500 (Mon, 24 Nov 2008)
New Revision: 34468

Modified:
   grass/branches/develbranch_6/lib/vector/Vlib/intersect.c
Log:
vlib: IPnts must be allocated first


Modified: grass/branches/develbranch_6/lib/vector/Vlib/intersect.c
===================================================================
--- grass/branches/develbranch_6/lib/vector/Vlib/intersect.c	2008-11-24 05:57:13 UTC (rev 34467)
+++ grass/branches/develbranch_6/lib/vector/Vlib/intersect.c	2008-11-24 07:13:53 UTC (rev 34468)
@@ -1087,6 +1087,9 @@
 				    BPnts->y[j + 1], BPnts->z[j + 1], &x1,
 				    &y1, &z1, &x2, &y2, &z2, 0);
 
+    if (!IPnts)
+	IPnts = Vect_new_line_struct();
+    
     switch (ret) {
     case 0:
     case 5:
@@ -1139,6 +1142,9 @@
 
     /* TODO: 3D, RE (representation error) threshold, GV_POINTS (line x point) */
 
+    if (!IPnts)
+	IPnts = Vect_new_line_struct();
+
     /* If one or both are point (Points->n_points == 1) */
     if (APoints->n_points == 1 && BPoints->n_points == 1) {
 	if (APoints->x[0] == BPoints->x[0] && APoints->y[0] == BPoints->y[0]) {



More information about the grass-commit mailing list