avoid crash in RegionView constructors, caused by accessing _region too early
This commit is contained in:
parent
5c9626648c
commit
82d502f67a
@ -111,16 +111,16 @@ RegionView::RegionView (const RegionView& other)
|
||||
{
|
||||
UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &RegionView::parameter_changed));
|
||||
|
||||
for (SourceList::const_iterator s = _region->sources().begin(); s != _region->sources().end(); ++s) {
|
||||
(*s)->CueMarkersChanged.connect (*this, invalidator (*this), boost::bind (&RegionView::update_cue_markers, this), gui_context());
|
||||
}
|
||||
|
||||
/* derived concrete type will call init () */
|
||||
|
||||
_region = other._region;
|
||||
current_visible_sync_position = other.current_visible_sync_position;
|
||||
valid = false;
|
||||
_pixel_width = other._pixel_width;
|
||||
|
||||
for (SourceList::const_iterator s = _region->sources().begin(); s != _region->sources().end(); ++s) {
|
||||
(*s)->CueMarkersChanged.connect (*this, invalidator (*this), boost::bind (&RegionView::update_cue_markers, this), gui_context());
|
||||
}
|
||||
}
|
||||
|
||||
RegionView::RegionView (const RegionView& other, boost::shared_ptr<Region> other_region)
|
||||
@ -132,10 +132,6 @@ RegionView::RegionView (const RegionView& other, boost::shared_ptr<Region> other
|
||||
{
|
||||
UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &RegionView::parameter_changed));
|
||||
|
||||
for (SourceList::const_iterator s = _region->sources().begin(); s != _region->sources().end(); ++s) {
|
||||
(*s)->CueMarkersChanged.connect (*this, invalidator (*this), boost::bind (&RegionView::update_cue_markers, this), gui_context());
|
||||
}
|
||||
|
||||
/* derived concrete type will call init () */
|
||||
/* this is a pseudo-copy constructor used when dragging regions
|
||||
around on the canvas.
|
||||
@ -147,8 +143,13 @@ RegionView::RegionView (const RegionView& other, boost::shared_ptr<Region> other
|
||||
current_visible_sync_position = other.current_visible_sync_position;
|
||||
valid = false;
|
||||
_pixel_width = other._pixel_width;
|
||||
|
||||
for (SourceList::const_iterator s = _region->sources().begin(); s != _region->sources().end(); ++s) {
|
||||
(*s)->CueMarkersChanged.connect (*this, invalidator (*this), boost::bind (&RegionView::update_cue_markers, this), gui_context());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
RegionView::RegionView (ArdourCanvas::Container* parent,
|
||||
TimeAxisView& tv,
|
||||
boost::shared_ptr<ARDOUR::Region> r,
|
||||
|
Loading…
Reference in New Issue
Block a user