summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-12-21 20:13:37 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-12-21 20:13:37 +0000
commit9946e615cac53998de4a48c5f1fe061efa6edf1e (patch)
tree5359342686169508254fa64484278c81d81b5760 /libs/ardour
parent88acb20c73c1818705d49add9d330f4df683999c (diff)
fix crashing bug on cut operation; panner noodling
git-svn-id: svn://localhost/ardour2/trunk@1243 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/playlist.cc8
-rw-r--r--libs/ardour/playlist_factory.cc1
2 files changed, 6 insertions, 3 deletions
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc
index 8c1c608e1b..bdaa33f0aa 100644
--- a/libs/ardour/playlist.cc
+++ b/libs/ardour/playlist.cc
@@ -122,12 +122,14 @@ Playlist::Playlist (boost::shared_ptr<const Playlist> other, string namestr, boo
Playlist::Playlist (boost::shared_ptr<const Playlist> other, nframes_t start, nframes_t cnt, string str, bool hide)
: _name (str), _session (other->_session), _orig_diskstream_id(other->_orig_diskstream_id)
{
- RegionLock rlock2 (&((Playlist&)other));
-
+ RegionLock rlock2 (const_cast<Playlist*> (other.get()));
+
nframes_t end = start + cnt - 1;
init (hide);
+ in_set_state++;
+
for (RegionList::const_iterator i = other->regions.begin(); i != other->regions.end(); i++) {
boost::shared_ptr<Region> region;
@@ -178,6 +180,8 @@ Playlist::Playlist (boost::shared_ptr<const Playlist> other, nframes_t start, nf
add_region_internal (new_region, position);
}
+ in_set_state--;
+
/* this constructor does NOT notify others (session) */
}
diff --git a/libs/ardour/playlist_factory.cc b/libs/ardour/playlist_factory.cc
index f5f19d5b5b..636b09213d 100644
--- a/libs/ardour/playlist_factory.cc
+++ b/libs/ardour/playlist_factory.cc
@@ -89,7 +89,6 @@ PlaylistFactory::create (boost::shared_ptr<const Playlist> old, nframes_t start,
pl->set_region_ownership ();
}
-
/* this factory method does NOT notify others */
return pl;