diff options
author | Carl Hetherington <carl@carlh.net> | 2010-05-05 22:09:07 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-05-05 22:09:07 +0000 |
commit | 8c423ea2284289a59e1cd549e7661114fa978ec8 (patch) | |
tree | 03ab5461a4603634aa06bb798cd1a4c38af8ce8f /gtk2_ardour/editor_canvas_events.cc | |
parent | b092cfc21638e4b89164f36ed708136c6cf9c8e0 (diff) |
Small cleanups to dragging code. Fix assertion failure on dragging a regions' parent entry from the region list to the canvas (which may be #2811). Fixes to drags of regions onto and then back off canvas; should fix #3109.
git-svn-id: svn://localhost/ardour2/branches/3.0@7068 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_canvas_events.cc')
-rw-r--r-- | gtk2_ardour/editor_canvas_events.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_canvas_events.cc b/gtk2_ardour/editor_canvas_events.cc index 8b57ccb8df..28074c23e8 100644 --- a/gtk2_ardour/editor_canvas_events.cc +++ b/gtk2_ardour/editor_canvas_events.cc @@ -996,6 +996,10 @@ Editor::track_canvas_drag_motion (Glib::RefPtr<Gdk::DragContext> const & /*c*/, boost::shared_ptr<Region> region = _regions->get_dragged_region (); + if (!region) { + return true; + } + boost::shared_ptr<Region> region_copy = RegionFactory::create (region); if (boost::dynamic_pointer_cast<AudioRegion> (region_copy) != 0 && |