13
0

Fix potential crash in snap_to_grid (grid-mark list is empty).

This commit is contained in:
Ben Loftis 2018-02-11 12:05:23 -06:00
parent 0299229e41
commit 0e72ba4b64

View File

@ -2710,6 +2710,8 @@ check_best_snap ( samplepos_t presnap, samplepos_t &test, samplepos_t &dist, sam
samplepos_t
Editor::snap_to_grid (vector<ArdourCanvas::Ruler::Mark> marks, samplepos_t presnap, RoundMode direction)
{
if (marks.empty() ) return presnap;
samplepos_t before;
samplepos_t after;
samplepos_t test;