distance: fix a NULL checkIntroduced in 44a7d69affa2d9983d0b8bced694bdbe3b79ab3dFound by cppcheck (rare enough to be noted)Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>