fix obvious copy+paste typo in computeDistance()

(with this else-branch, argument contour2 would not be used at all)