diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc index c5d70ffe7f..95f41ac400 100644 --- a/libs/ardour/audio_unit.cc +++ b/libs/ardour/audio_unit.cc @@ -2899,6 +2899,10 @@ AUPluginInfo::discover_by_description (PluginInfoList& plugs, CAComponentDescrip } if (is_blacklisted(CFStringRefToStdString(itemName))) { + if (itemName != NULL) { + CFRelease(itemName); + itemName = NULL; + } info << string_compose (_("Skipped blacklisted AU plugin %1 "), CFStringRefToStdString(itemName)) << endmsg; comp = ArdourFindNext (comp, &desc); continue; diff --git a/libs/ardour/vst3_scan.cc b/libs/ardour/vst3_scan.cc index 99be890e44..7c67abeeed 100644 --- a/libs/ardour/vst3_scan.cc +++ b/libs/ardour/vst3_scan.cc @@ -444,7 +444,15 @@ ARDOUR::vst3_scan_and_cache (std::string const& module_path, std::string const& try { boost::shared_ptr m = VST3PluginModule::load (module_path); std::vector nfo; - discover_vst3 (m, nfo, verbose); + if (!discover_vst3 (m, nfo, verbose)) { + delete root; + return false; + } + if (nfo.empty ()) { + cerr << "No plugins in VST3 module: '" << module_path << "'\n"; + delete root; + return false; + } for (std::vector::const_iterator i = nfo.begin(); i != nfo.end(); ++i) { cb (module_path, *i); root->add_child_nocopy (i->state ());