diff options
author | Carl Hetherington <carl@carlh.net> | 2012-02-26 20:48:51 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-02-26 20:48:51 +0000 |
commit | bd2e28aaacaf75448324cdd139d2062ce595d2c1 (patch) | |
tree | 55a5adf47057a5871a62a17ed04dc40f5bedab51 /gtk2_ardour | |
parent | fdca23a79169be8f12655ed6dea3e37948321e9c (diff) |
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
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/export_file_notebook.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk2_ardour/export_file_notebook.cc b/gtk2_ardour/export_file_notebook.cc index 959bc42a2f..c9cd747d75 100644 --- a/gtk2_ardour/export_file_notebook.cc +++ b/gtk2_ardour/export_file_notebook.cc @@ -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()); |