diff --git a/gtk2_ardour/midi_streamview.cc b/gtk2_ardour/midi_streamview.cc index 4448a5e323..843ca1bfc2 100644 --- a/gtk2_ardour/midi_streamview.cc +++ b/gtk2_ardour/midi_streamview.cc @@ -163,7 +163,8 @@ MidiStreamView::add_region_view_internal (boost::shared_ptr 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 wr (region); // make this explicit + region->DropReferences.connect (*this, invalidator (*this), boost::bind (&MidiStreamView::remove_region_view, this, wr), gui_context()); RegionViewAdded (region_view);