From bd2e28aaacaf75448324cdd139d2062ce595d2c1 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 26 Feb 2012 20:48:51 +0000 Subject: 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 --- gtk2_ardour/export_file_notebook.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gtk2_ardour') 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()); -- cgit v1.2.3