Fix crash on trying to snap to markers when there aren't

any (#4988).


git-svn-id: svn://localhost/ardour2/branches/3.0@12989 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2012-07-04 21:53:44 +00:00
parent 25e5bfd17e
commit c1d4f87471

View file

@ -2743,7 +2743,10 @@ Editor::snap_to_internal (framepos_t& start, int32_t direction, bool for_mark)
_session->locations()->marks_either_side (start, before, after);
if (before == max_framepos) {
if (before == max_framepos && after == max_framepos) {
/* No marks to snap to, so just don't snap */
return;
} else if (before == max_framepos) {
start = after;
} else if (after == max_framepos) {
start = before;