diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc index 1302804cec..3fefa6af9a 100644 --- a/gtk2_ardour/editor_markers.cc +++ b/gtk2_ardour/editor_markers.cc @@ -334,7 +334,10 @@ Editor::update_marker_labels (ArdourCanvas::Group* group) list::iterator prev = sorted.end (); list::iterator next = i; - ++next; + + if (next != sorted.end()) { + ++next; + } while (i != sorted.end()) {