summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-08-29 18:07:08 +0000
committerCarl Hetherington <carl@carlh.net>2009-08-29 18:07:08 +0000
commit94c5a98e025a8ef9976e5758a6504f1c9b90b16b (patch)
tree49de5f67cc2b19634640c2414296c3538c37af8d /libs
parent5cbfdb8bedc045401696559561a067b036165dab (diff)
Fix crash on relayering.
git-svn-id: svn://localhost/ardour2/branches/3.0@5603 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/playlist.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc
index 94e6e421bd..cd53f35d95 100644
--- a/libs/ardour/playlist.cc
+++ b/libs/ardour/playlist.cc
@@ -1999,7 +1999,7 @@ Playlist::relayer ()
/* don't send multiple Modified notifications
when multiple regions are relayered.
*/
-
+
freeze ();
/* Build up a new list of regions on each layer, stored in a set of lists
@@ -2019,7 +2019,7 @@ Playlist::relayer ()
}
/* hence the size of each time division */
- double const division_size = (end - start) / divisions;
+ double const division_size = (end - start) / double (divisions);
vector<vector<RegionList> > layers;
layers.push_back (vector<RegionList> (divisions));
@@ -2054,6 +2054,8 @@ Playlist::relayer ()
end_division--;
}
+ assert (end_division < divisions);
+
/* find the lowest layer that this region can go on */
size_t j = layers.size();
while (j > 0) {