[GRASS-SVN] r55994 - grass/trunk/lib/vector/diglib
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Apr 25 05:31:17 PDT 2013
Author: mmetz
Date: 2013-04-25 05:31:17 -0700 (Thu, 25 Apr 2013)
New Revision: 55994
Modified:
grass/trunk/lib/vector/diglib/plus_line.c
Log:
diglib: avoid segfault for POstGIS topology
Modified: grass/trunk/lib/vector/diglib/plus_line.c
===================================================================
--- grass/trunk/lib/vector/diglib/plus_line.c 2013-04-25 12:30:25 UTC (rev 55993)
+++ grass/trunk/lib/vector/diglib/plus_line.c 2013-04-25 12:31:17 UTC (rev 55994)
@@ -268,6 +268,9 @@
}
Node->n_lines--;
+ if (plus->uplist.do_uplist) {
+ dig_node_add_updated(plus, Node->n_lines > 0 ? N1 : -N1);
+ }
if (Node->n_lines == 0) {
G_debug(3, " node %d has 0 lines -> delete", N1);
dig_spidx_del_node(plus, N1);
@@ -275,9 +278,6 @@
dig_free_node(Node);
plus->Node[N1] = NULL;
}
- if (plus->uplist.do_uplist) {
- dig_node_add_updated(plus, Node->n_lines > 0 ? N1 : -N1);
- }
if (Line->type == GV_LINE) {
struct P_topo_l *topo = (struct P_topo_l *)Line->topo;
@@ -304,6 +304,9 @@
}
Node->n_lines--;
+ if (plus->uplist.do_uplist) {
+ dig_node_add_updated(plus, Node->n_lines > 0 ? N2 : -N2);
+ }
if (Node->n_lines == 0) {
G_debug(3, " node %d has 0 lines -> delete", N2);
dig_spidx_del_node(plus, N2);
@@ -311,9 +314,6 @@
dig_free_node(Node);
plus->Node[N2] = NULL;
}
- if (plus->uplist.do_uplist) {
- dig_node_add_updated(plus, Node->n_lines > 0 ? N2 : -N2);
- }
/* Delete line */
dig_free_line(Line);
More information about the grass-commit
mailing list