mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 03:36:32 +01:00
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:
parent
25e5bfd17e
commit
c1d4f87471
1 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue