Sfoglia il codice sorgente

fix null access on js (close #483)

ncannasse 6 anni fa
parent
commit
ee1298290f
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  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