force use of a weak_ptr<> when binding in MidiStreamView, hopefully avoiding putting a shared_ptr<Region> into an object

git-svn-id: svn://localhost/ardour2/branches/3.0@13845 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2013-01-15 15:12:30 +00:00
parent 5b9bd3eea0
commit d7ea70f4f1
1 changed files with 2 additions and 1 deletions

View File

@ -163,7 +163,8 @@ MidiStreamView::add_region_view_internal (boost::shared_ptr<Region> r, bool wfd,
}
/* catch regionview going away */
region->DropReferences.connect (*this, invalidator (*this), boost::bind (&MidiStreamView::remove_region_view, this, region), gui_context());
boost::weak_ptr<Region> wr (region); // make this explicit
region->DropReferences.connect (*this, invalidator (*this), boost::bind (&MidiStreamView::remove_region_view, this, wr), gui_context());
RegionViewAdded (region_view);