From d39f064756c88197adfe13fe695b86bd8cb3bb81 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 26 Sep 2022 01:10:14 -0600 Subject: [PATCH] library dialog: catch exception and behave appropriately --- gtk2_ardour/library_download_dialog.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/library_download_dialog.cc b/gtk2_ardour/library_download_dialog.cc index e894f09b19..30c4c2f51a 100644 --- a/gtk2_ardour/library_download_dialog.cc +++ b/gtk2_ardour/library_download_dialog.cc @@ -208,8 +208,14 @@ LibraryDownloadDialog::download (Gtk::TreePath const & path) { Gtk::TreeModel::iterator row = _model->get_iter (path); std::string url = (*row)[_columns.url]; + PBD::Downloader* downloader; - PBD::Downloader* downloader = new PBD::Downloader (url, ARDOUR::Config->get_clip_library_dir()); + try { + downloader = new PBD::Downloader (url, ARDOUR::Config->get_clip_library_dir()); + } catch (...) { + (*row)[_columns.install] = _("Error"); + return; + } /* setup timer callback to update progressbar */