From 4caecfa310a973773a74e74939896133ad6d4c8d Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 20 Mar 2013 17:15:08 -0400 Subject: [PATCH] fix other potential crashes with non-existing plugins and presets caused by indiscriminate use of vector_delete --- libs/ardour/plugin_manager.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc index a67dc97289..c4bd6d77e8 100644 --- a/libs/ardour/plugin_manager.cc +++ b/libs/ardour/plugin_manager.cc @@ -278,9 +278,10 @@ PluginManager::ladspa_discover_from_path (string /*path*/) for (x = plugin_objects->begin(); x != plugin_objects->end (); ++x) { ladspa_discover (**x); } + + vector_delete (plugin_objects); } - vector_delete (plugin_objects); return ret; } @@ -356,9 +357,9 @@ PluginManager::add_lrdf_data (const string &path) warning << "Could not parse rdf file: " << uri << endmsg; } } - } - vector_delete (rdf_files); + vector_delete (rdf_files); + } } int @@ -579,9 +580,10 @@ PluginManager::windows_vst_discover_from_path (string path) for (x = plugin_objects->begin(); x != plugin_objects->end (); ++x) { windows_vst_discover (**x); } + + vector_delete (plugin_objects); } - vector_delete (plugin_objects); return ret; } @@ -684,9 +686,10 @@ PluginManager::lxvst_discover_from_path (string path) for (x = plugin_objects->begin(); x != plugin_objects->end (); ++x) { lxvst_discover (**x); } + + vector_delete (plugin_objects); } - vector_delete (plugin_objects); return ret; }