From 94c5a98e025a8ef9976e5758a6504f1c9b90b16b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 29 Aug 2009 18:07:08 +0000 Subject: [PATCH] Fix crash on relayering. git-svn-id: svn://localhost/ardour2/branches/3.0@5603 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/playlist.cc | 6 ++++-- 1 file 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 > layers; layers.push_back (vector (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) {