two more drop zone checks
authorRobin Gareus <robin@gareus.org>
Wed, 25 Mar 2015 12:05:24 +0000 (13:05 +0100)
committerRobin Gareus <robin@gareus.org>
Wed, 25 Mar 2015 12:05:24 +0000 (13:05 +0100)
see also 6cfb6ef

gtk2_ardour/editor_drag.cc

index bd65dd1b5567d85ecfb6675f6083e01c867f00a0..ed28bc39766596e6f0f9ee1500b9220ac37e87e6 100644 (file)
@@ -686,7 +686,7 @@ RegionMotionDrag::y_movement_allowed (int delta_track, double delta_layer, int s
 #endif
                assert (n < 0 || n >= _time_axis_views.size() || !_time_axis_views[n]->hidden());
 
-               if (i->time_axis_view < 0) {
+               if (i->time_axis_view < 0 || i->time_axis_view >= _time_axis_views.size()) {
                        /* already in the drop zone */
                        if (delta_track >= 0) {
                                /* downward motion - might be OK if others are still not in the dropzone,
@@ -1331,7 +1331,7 @@ RegionMoveDrag::finished_copy (bool const changed_position, bool const /*changed
                        where = i->view->region()->position();
                }
 
-               if (i->time_axis_view < 0) {
+               if (i->time_axis_view < 0 || i->time_axis_view >= _time_axis_views.size()) {
                        /* dragged to drop zone */
 
                        PlaylistMapping::iterator pm;