summaryrefslogtreecommitdiff
path: root/gtk2_ardour/selection.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-09-14 00:34:49 +0000
committerCarl Hetherington <carl@carlh.net>2010-09-14 00:34:49 +0000
commit4ce12d75e184181d8314cd039e8da512dffb8fa2 (patch)
tree60efb1af702c92f17a47c5459de90a215445cd84 /gtk2_ardour/selection.cc
parentbc8aeb04259ef711498abfe66ff28ba623477350 (diff)
Fix another assertion failure if a saved selection doesn't correspond to the things that are actually present in the session file.
git-svn-id: svn://localhost/ardour2/branches/3.0@7769 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/selection.cc')
-rw-r--r--gtk2_ardour/selection.cc23
1 files changed, 12 insertions, 11 deletions
diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc
index 59928dc303..7735993bc1 100644
--- a/gtk2_ardour/selection.cc
+++ b/gtk2_ardour/selection.cc
@@ -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());
+ }
+ }
}
}