From a0a49b976963cbbcc6d4bb2848e8e950c8a89040 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 4 Nov 2022 22:10:19 +0100 Subject: [PATCH] Prevent crash if export format is N/A This can happen when trying to use the mp3 preset while there is no mp3 encoder available. --- libs/ardour/export_profile_manager.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libs/ardour/export_profile_manager.cc b/libs/ardour/export_profile_manager.cc index 60dc8eeccd..ff83fcc90e 100644 --- a/libs/ardour/export_profile_manager.cc +++ b/libs/ardour/export_profile_manager.cc @@ -905,6 +905,13 @@ ExportProfileManager::get_warnings () } } + for (auto const& fm : formats) { + if (!fm->format) { + warnings->errors.push_back (_("Invalid export format selected!")); + return warnings; + } + } + /*** Check files ***/ /* handle_duplicate_format_extensions */