diff --git a/libs/ardour/selection.cc b/libs/ardour/selection.cc index 3c4475872b..c75d578c4c 100644 --- a/libs/ardour/selection.cc +++ b/libs/ardour/selection.cc @@ -79,7 +79,9 @@ CoreSelection::select_adjacent_stripable (bool mixer_order, bool routes_only, /* fetch the current selection so that we can get the most recently selected */ StripableAutomationControls selected; get_stripables (selected); - boost::shared_ptr last_selected = selected.back().stripable; + boost::shared_ptr last_selected = + selected.empty () ? boost::shared_ptr () + : selected.back ().stripable; /* Get all stripables and sort into the appropriate ordering */ StripableList stripables;