mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-03 04:09:29 +01:00
fix crash when importing midi files with >1 midi-channel -- fixes #5965
This commit is contained in:
parent
a86fed7180
commit
52b6edb0e3
1 changed files with 6 additions and 1 deletions
|
|
@ -746,7 +746,12 @@ Editor::add_sources (vector<string> paths, SourceList& sources, framepos_t& pos,
|
|||
region_name = (*x)->name();
|
||||
}
|
||||
|
||||
track_names.push_back (PBD::basename_nosuffix (paths[n]));
|
||||
if (SMFSource::safe_midi_file_extension (paths.front())) {
|
||||
string track_name = string_compose ("%1-c%2", PBD::basename_nosuffix (fs->path()), (n + 1));
|
||||
track_names.push_back (track_name);
|
||||
} else {
|
||||
track_names.push_back (PBD::basename_nosuffix (paths[n]));
|
||||
}
|
||||
}
|
||||
|
||||
PropertyList plist;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue