diff options
author | Robin Gareus <robin@gareus.org> | 2014-06-15 20:46:06 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-06-15 21:07:19 +0200 |
commit | c7c3c1e924bc28e5c54e62ea3d9883ae2fe005fd (patch) | |
tree | d91c88441f0fbd92be019dba3b9fb4c8e51d1f04 /libs/ardour/import.cc | |
parent | 443ccb866ffae5f1d21a8ae6942a77adb9acd92e (diff) |
another edge-case, don't crash on invalid files with zero channels
Diffstat (limited to 'libs/ardour/import.cc')
-rw-r--r-- | libs/ardour/import.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/ardour/import.cc b/libs/ardour/import.cc index 3ab46bfec5..04a62b06e1 100644 --- a/libs/ardour/import.cc +++ b/libs/ardour/import.cc @@ -522,6 +522,11 @@ Session::import_files (ImportStatus& status) } } + if (channels == 0) { + error << _("Import: file contains no channels.") << endmsg; + continue; + } + vector<string> new_paths = get_paths_for_new_sources (config.get_native_file_header_format(), status.replace_existing_source, *p, get_best_session_directory_for_new_source (), |