Fix another assertion failure if a saved selection doesn't correspond to the things...
authorCarl Hetherington <carl@carlh.net>
Tue, 14 Sep 2010 00:34:49 +0000 (00:34 +0000)
committerCarl Hetherington <carl@carlh.net>
Tue, 14 Sep 2010 00:34:49 +0000 (00:34 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7769 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/selection.cc

index 59928dc303254b15019f94cf5fa85be9b974465f..7735993bc18ac9828bca200811382df4e96411ac 100644 (file)
@@ -1143,18 +1143,19 @@ Selection::set_state (XMLNode const & node, int)
 
                        PBD::ID id (prop_id->value ());
                        RouteTimeAxisView* rtv = editor->get_route_view_by_route_id (id);
-                       assert (rtv);
-                       
-                       boost::shared_ptr<AutomationTimeAxisView> atv = rtv->automation_child (EventTypeMap::instance().new_parameter (prop_parameter->value ()));
+
+                       if (rtv) {
+                               boost::shared_ptr<AutomationTimeAxisView> atv = rtv->automation_child (EventTypeMap::instance().new_parameter (prop_parameter->value ()));
                         
-                        /* the automation could be for an entity that was never saved
-                           in the session file. Don't freak out if we can't find
-                           it.
-                        */
-
-                        if (atv) {
-                                add (atv.get());
-                        }
+                               /* the automation could be for an entity that was never saved
+                                  in the session file. Don't freak out if we can't find
+                                  it.
+                               */
+                               
+                               if (atv) {
+                                       add (atv.get());
+                               }
+                       }
                }
        }