Skip to content

Commit

Permalink
fixed bug when adding edges to optimized graph
Browse files Browse the repository at this point in the history
  • Loading branch information
karussell committed Mar 18, 2018
1 parent 7f82541 commit 6be91f3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/main/java/com/graphhopper/storage/BaseGraph.java
Expand Up @@ -703,6 +703,9 @@ void inPlaceNodeRemove(int removeNodeCount) {
setWayGeometry_(fetchWayGeometry_(edgePointer, true, 0, -1, -1), edgePointer, false);
}

// clear N_EDGE_REF
initNodeRefs((nodeCount - removeNodeCount) * nodeEntryBytes, nodeCount * nodeEntryBytes);

if (removeNodeCount >= nodeCount)
throw new IllegalStateException("graph is empty after in-place removal but was " + removeNodeCount);

Expand Down

0 comments on commit 6be91f3

Please sign in to comment.