Browse Source

fix null access on js (close #483)

ncannasse 6 years ago
parent
commit
ee1298290f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      h2d/col/Voronoi.hx

+ 2 - 2
h2d/col/Voronoi.hx

@@ -1577,8 +1577,8 @@ class Voronoi {
 		var eid = 0;
 		for( e in edges ) {
 			e.id = eid++;
-			e.lCell = pointCell.get(e.lPoint);
-			e.rCell = pointCell.get(e.rPoint);
+			e.lCell = e.lPoint == null ? null : pointCell.get(e.lPoint);
+			e.rCell = e.rPoint == null ? null : pointCell.get(e.rPoint);
 		}
 
 		// to measure execution time