fix crash when importing MIDI with "at timestamp" chosen
git-svn-id: svn://localhost/ardour2/branches/3.0@8206 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
0a19ce6f1c
commit
e621d704ac
|
@ -792,7 +792,8 @@ Editor::add_sources (vector<string> paths, SourceList& sources, framepos_t& pos,
|
|||
for (vector<boost::shared_ptr<Region> >::iterator r = regions.begin(); r != regions.end(); ++r, ++n) {
|
||||
boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion> (*r);
|
||||
|
||||
if (use_timestamp && ar) {
|
||||
if (use_timestamp) {
|
||||
if (ar) {
|
||||
|
||||
/* get timestamp for this region */
|
||||
|
||||
|
@ -814,8 +815,12 @@ Editor::add_sources (vector<string> paths, SourceList& sources, framepos_t& pos,
|
|||
} else {
|
||||
pos = get_preferred_edit_position ();
|
||||
}
|
||||
|
||||
} else {
|
||||
/* should really get first position in MIDI file, but for now, use edit position*/
|
||||
pos = get_preferred_edit_position ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
finish_bringing_in_material (*r, input_chan, output_chan, pos, mode, track);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user