mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
Fix crash on MIDI import.
git-svn-id: svn://localhost/ardour2/branches/3.0@5784 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
12598155a2
commit
39ad06f03b
1 changed files with 3 additions and 3 deletions
|
|
@ -214,8 +214,7 @@ create_mono_sources_for_writing (const vector<string>& new_paths, Session& sess,
|
||||||
uint samplerate, vector<boost::shared_ptr<Source> >& newfiles,
|
uint samplerate, vector<boost::shared_ptr<Source> >& newfiles,
|
||||||
nframes64_t /*timeline_position*/)
|
nframes64_t /*timeline_position*/)
|
||||||
{
|
{
|
||||||
for (vector<string>::const_iterator i = new_paths.begin();
|
for (vector<string>::const_iterator i = new_paths.begin(); i != new_paths.end(); ++i)
|
||||||
i != new_paths.end(); ++i)
|
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Source> source;
|
boost::shared_ptr<Source> source;
|
||||||
|
|
||||||
|
|
@ -432,12 +431,13 @@ Session::import_audiofiles (ImportStatus& status)
|
||||||
get_best_session_directory_for_new_source (),
|
get_best_session_directory_for_new_source (),
|
||||||
channels);
|
channels);
|
||||||
Sources newfiles;
|
Sources newfiles;
|
||||||
|
nframes64_t natural_position = source ? source->natural_position() : 0;
|
||||||
|
|
||||||
if (status.replace_existing_source) {
|
if (status.replace_existing_source) {
|
||||||
fatal << "THIS IS NOT IMPLEMENTED YET, IT SHOULD NEVER GET CALLED!!! DYING!" << endl;
|
fatal << "THIS IS NOT IMPLEMENTED YET, IT SHOULD NEVER GET CALLED!!! DYING!" << endl;
|
||||||
status.cancel = !map_existing_mono_sources (new_paths, *this, frame_rate(), newfiles, this);
|
status.cancel = !map_existing_mono_sources (new_paths, *this, frame_rate(), newfiles, this);
|
||||||
} else {
|
} else {
|
||||||
status.cancel = !create_mono_sources_for_writing (new_paths, *this, frame_rate(), newfiles, source->natural_position());
|
status.cancel = !create_mono_sources_for_writing (new_paths, *this, frame_rate(), newfiles, natural_position);
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy on cancel/failure so that any files that were created will be removed below
|
// copy on cancel/failure so that any files that were created will be removed below
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue