Fix case where distance is zero length comparison

This commit is contained in:
mrg 2022-05-17 15:49:06 -07:00
parent f1f4453d14
commit c8905c410a
1 changed files with 1 additions and 1 deletions

View File

@ -1227,7 +1227,7 @@ class router(router_tech):
if pin1.layer != pin2.layer:
continue
new_dist = pin1.distance(pin2)
if not min_dist or new_dist < min_dist:
if min_dist == None or new_dist < min_dist:
min_item = (pin1, pin2)
min_dist = new_dist