avoid crash on region drag end trying to access TimeAxisView::view() for TAV's that...
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 29 Dec 2011 14:48:42 +0000 (14:48 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 29 Dec 2011 14:48:42 +0000 (14:48 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@11105 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor_drag.cc

index 5482b265cf396f65173745d782df9d049ee6dbc7..f37d6e255655871fd58cb0b8a7cb083d07f4da15 100644 (file)
@@ -818,6 +818,10 @@ void
 RegionMotionDrag::finished (GdkEvent *, bool)
 {
        for (vector<TimeAxisView*>::iterator i = _time_axis_views.begin(); i != _time_axis_views.end(); ++i) {
+               if (!(*i)->view()) {
+                       continue;
+               }
+
                if ((*i)->view()->layer_display() == Expanded) {
                        (*i)->view()->set_layer_display (Stacked);
                }