Fix confusion about the 'done' variable in InterThreadInfo during import. 'done...
[ardour.git] / gtk2_ardour / port_group.cc
index 1598c5933c2b11ade888562586f1df2512d3f75b..aabe07157bf3010bf3d6ec483d1043b9f11ac77d 100644 (file)
@@ -209,7 +209,8 @@ PortGroup::io_from_bundle (boost::shared_ptr<ARDOUR::Bundle> b) const
                return boost::shared_ptr<IO> ();
        }
 
-       return (*i)->io;
+       boost::shared_ptr<IO> io ((*i)->io.lock ());
+       return io;
 }
 
 /** Remove bundles whose channels are already represented by other, larger bundles */
@@ -306,6 +307,7 @@ struct RouteIOs {
        }
        
        boost::shared_ptr<Route> route;
+       /* it's ok to use a shared_ptr here as RouteIOs structs are only used during ::gather () */
        std::list<boost::shared_ptr<IO> > ios;
 };
 
@@ -331,7 +333,7 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
        boost::shared_ptr<PortGroup> bus (new PortGroup (_("Bus")));
        boost::shared_ptr<PortGroup> track (new PortGroup (_("Track")));
        boost::shared_ptr<PortGroup> system (new PortGroup (_("System")));
-       boost::shared_ptr<PortGroup> ardour (new PortGroup (_("Ardour")));
+       boost::shared_ptr<PortGroup> ardour (new PortGroup (PROGRAM_NAME));
        boost::shared_ptr<PortGroup> other (new PortGroup (_("Other")));
 
        /* Find the IOs which have bundles for routes and their processors.  We store