summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-09-15 14:37:08 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-09-15 14:37:08 +0000
commit3254468526441d82134d49fd8c01305c4c362851 (patch)
tree9c53f5af801a09a91fe4956a5867004f72ce62cc /gtk2_ardour/editor_ops.cc
parent5e7ead224a036fc5ff9212cab615cd16f6f5aa84 (diff)
fix crash caused when deleting a region without a playlist PLUS make it impossible to select a region without a playlist (i.e. part of an unfinished capture pass). fixes #1502
git-svn-id: svn://localhost/ardour2/branches/3.0@7779 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index eac9068507..159df414a9 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -4144,7 +4144,10 @@ Editor::cut_copy_regions (CutCopyOp op, RegionSelection& rs)
boost::shared_ptr<Playlist> pl = (*x)->region()->playlist();
if (!pl) {
- /* impossible, but this handles it for the future */
+ /* region not yet associated with a playlist (e.g. unfinished
+ capture pass.
+ */
+ ++x;
continue;
}
@@ -4203,8 +4206,10 @@ Editor::cut_copy_regions (CutCopyOp op, RegionSelection& rs)
/* the pmap is in the same order as the tracks in which selected regions occured */
for (vector<PlaylistMapping>::iterator i = pmap.begin(); i != pmap.end(); ++i) {
- (*i).pl->thaw();
- foo.push_back ((*i).pl);
+ if ((*i).pl) {
+ (*i).pl->thaw();
+ foo.push_back ((*i).pl);
+ }
}
if (!foo.empty()) {