router: fix segfault on route-undo-route