[matching] do not dereference end iterator
[matching] do not dereference end iterator

check iterator validity before trying to access its content
poparteu/openMVG,poparteu/openMVG,poparteu/openMVG,poparteu/openMVG