Issue #2967 fix error when erasing the last piece of a telestrator line
Change-Id: I51a3a07848dfa8639f553f86a831f15e9965bf84 Former-commit-id: d152fa62494ae9b2880a94de92587df0db1bad6c
This commit is contained in:
parent
ef337f77d2
commit
6b3504a39c
1 changed files with 5 additions and 2 deletions
|
@ -64,6 +64,7 @@ import com.vividsolutions.jts.geom.TopologyException;
|
|||
* ------------- -------- ----------- --------------------------
|
||||
* May 23, 2012 mschenke Initial creation
|
||||
* May 23, 2012 2646 bsteffen Fix NPE in project.
|
||||
* Apr 03, 2014 2967 njensen Fix error when erasing the last part of a line
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -266,8 +267,10 @@ public class DrawingToolLayer implements IRenderable {
|
|||
// To avoid self intersecting lines, this
|
||||
// will split the difference geometry
|
||||
Coordinate[] coords = diff.getCoordinates();
|
||||
diff = diff.union(factory
|
||||
.createPoint(coords[0]));
|
||||
if (coords != null && coords.length > 0) {
|
||||
diff = diff.union(factory
|
||||
.createPoint(coords[0]));
|
||||
}
|
||||
}
|
||||
// Add diff to newGeoms
|
||||
flattenGeometry(diff, newGeoms);
|
||||
|
|
Loading…
Add table
Reference in a new issue