Fix crash on opening the export dialogue when there are no
formats (#4742). git-svn-id: svn://localhost/ardour2/branches/3.0@11524 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
fdca23a791
commit
bd2e28aaac
@ -273,8 +273,13 @@ void
|
||||
ExportFileNotebook::FilePage::update_example_filename()
|
||||
{
|
||||
if (profile_manager) {
|
||||
std::string example = profile_manager->get_sample_filename_for_format (
|
||||
filename_state->filename, format_state->format);
|
||||
|
||||
std::string example;
|
||||
if (format_state->format) {
|
||||
example = profile_manager->get_sample_filename_for_format (
|
||||
filename_state->filename, format_state->format);
|
||||
}
|
||||
|
||||
if (example != "") {
|
||||
sys::path path(example);
|
||||
filename_selector.set_example_filename(path.leaf());
|
||||
|
@ -714,6 +714,8 @@ ExportProfileManager::remove_filename_state (FilenameStatePtr state)
|
||||
std::string
|
||||
ExportProfileManager::get_sample_filename_for_format (ExportFilenamePtr filename, ExportFormatSpecPtr format)
|
||||
{
|
||||
assert (format);
|
||||
|
||||
if (channel_configs.empty()) { return ""; }
|
||||
|
||||
std::list<string> filenames;
|
||||
|
Loading…
Reference in New Issue
Block a user