Skip to content

Commit 028b6ea

Browse files
authored
Fix reflective null points (#1469)
1 parent c961f1e commit 028b6ea

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

photon-core/src/main/java/org/photonvision/vision/target/TrackedTarget.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,10 @@ public static List<PhotonTrackedTarget> simpleFromTrackedTargets(List<TrackedTar
441441
}
442442
{
443443
var points = t.getTargetCorners();
444-
for (Point point : points) {
445-
detectedCorners.add(new TargetCorner(point.x, point.y));
444+
if (points != null) {
445+
for (Point point : points) {
446+
detectedCorners.add(new TargetCorner(point.x, point.y));
447+
}
446448
}
447449
}
448450

0 commit comments

Comments
 (0)