Skip to content

Commit a152002

Browse files
committed
fixed rect and polygon null ref error
1 parent e712a64 commit a152002

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

echo/util/SAT.hx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,9 @@ class SAT {
362362

363363
var tr = Polygon.get_from_rect(r);
364364
var col = polygon_and_polygon(tr, p, flip);
365+
366+
if (col == null) return null;
367+
365368
if (flip) col.sb = r;
366369
else col.sa = r;
367370
tr.put();

haxelib.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"description": "Simple Physics Library written in Haxe",
66
"contributors": ["austineast"],
77
"url": "https://austineast.dev/echo",
8-
"releasenote": "fixed getting polygons with vertices",
9-
"version": "1.1.1",
8+
"releasenote": "fixed rect and polygon null ref error",
9+
"version": "1.1.2",
1010
"dependencies": {
1111
"hxmath": ""
1212
}

0 commit comments

Comments
 (0)