force use of a weak_ptr<> when binding in MidiStreamView, hopefully avoiding putting...
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 15 Jan 2013 15:12:30 +0000 (15:12 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 15 Jan 2013 15:12:30 +0000 (15:12 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@13845 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/midi_streamview.cc

index 4448a5e3237afcf811ec9774aedc34fba692cd83..843ca1bfc28bf6e4f5740141ab673f27dfe2f0b0 100644 (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);