From f6cfa3c3e13a9207f26c75534f697a76d748bf3b Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 27 Aug 2022 16:25:09 -0600 Subject: [PATCH] push2: let's not crash --- libs/surfaces/push2/cues.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/surfaces/push2/cues.cc b/libs/surfaces/push2/cues.cc index 3aca6e8b05..2c94e062e1 100644 --- a/libs/surfaces/push2/cues.cc +++ b/libs/surfaces/push2/cues.cc @@ -355,12 +355,12 @@ CueLayout::viewport_changed () _route[n] = _session.get_remote_nth_route (track_base+n); - _route[n]->DropReferences.connect (_route_connections, invalidator (*this), boost::bind (&CueLayout::viewport_changed, this), &_p2); - _route[n]->presentation_info().PropertyChanged.connect (_route_connections, invalidator (*this), boost::bind (&CueLayout::route_property_change, this, _1, n), &_p2); - boost::shared_ptr r = _route[n]; if (r) { + _route[n]->DropReferences.connect (_route_connections, invalidator (*this), boost::bind (&CueLayout::viewport_changed, this), &_p2); + _route[n]->presentation_info().PropertyChanged.connect (_route_connections, invalidator (*this), boost::bind (&CueLayout::route_property_change, this, _1, n), &_p2); + std::string shortname = short_version (r->name(), 10); _lower_text[n]->set (shortname);