Don't crash if selection is empty.