fix obvious copy+paste typo in computeDistance()

(with this else-branch, argument contour2 would not be used at all)
Merge pull request #3519 from fvgoto:patch-1