Skip to content

Commit

Permalink
check for negative index
Browse files Browse the repository at this point in the history
  • Loading branch information
christianrauch committed Feb 5, 2024
1 parent 359a984 commit cd5360b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apriltag.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,8 @@ static matd_t* homography_compute2(double c[4][4]) {
}
}

assert(max_val_idx != -1);

if (max_val < epsilon) {
debug_print("WRN: Matrix is singular.\n");
return NULL;
Expand Down

0 comments on commit cd5360b

Please sign in to comment.