Avoid crash on selection if view is empty.