mirror of
https://github.com/jhasse/poly2tri.git
synced 2024-11-19 12:06:09 +01:00
fixed null bug
This commit is contained in:
parent
ae5cf98122
commit
850b809c7b
@ -209,7 +209,7 @@ class CDT(val points: List[Point], val segments: List[Segment], iTriangle: Trian
|
|||||||
triangles += firstTriangle
|
triangles += firstTriangle
|
||||||
val e = edge.p - edge.q
|
val e = edge.p - edge.q
|
||||||
|
|
||||||
while(!triangles.last.contains(edge.p))
|
while(triangles.last != null && !triangles.last.contains(edge.p))
|
||||||
triangles += triangles.last.findNeighbor(e)
|
triangles += triangles.last.findNeighbor(e)
|
||||||
|
|
||||||
// TODO: Implement this section
|
// TODO: Implement this section
|
||||||
|
Loading…
Reference in New Issue
Block a user