fix possible crash when aborting a region drag and there are time axis views without streamviews

This commit is contained in:
Paul Davis 2013-07-09 09:45:54 -04:00
parent 38f2aa51bd
commit 3091b5f1ad

View File

@ -1281,8 +1281,13 @@ void
RegionMotionDrag::aborted (bool)
{
for (vector<TimeAxisView*>::iterator i = _time_axis_views.begin(); i != _time_axis_views.end(); ++i) {
if ((*i)->view()->layer_display() == Expanded) {
(*i)->view()->set_layer_display (Stacked);
StreamView* sview = (*i)->view();
if (sview) {
if (sview->layer_display() == Expanded) {
sview->set_layer_display (Stacked);
}
}
}