1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-19 14:17:41 +02:00

null checks -- fix Linux crash in drag-dropping files onto app icon?

This commit is contained in:
Paul Licameli 2018-01-03 15:34:49 -05:00
parent 889284555b
commit 50d6e75185
2 changed files with 7 additions and 1 deletions

View File

@ -514,6 +514,9 @@ void ModuleManager::FindAllPlugins(PluginIDList & providers, wxArrayString & pat
ModuleInterface *module =
static_cast<ModuleInterface *>(CreateProviderInstance(providerID, modPaths[i]));
if (!module)
continue;
wxArrayString newpaths = module->FindPluginPaths(pm);
for (size_t i = 0, cnt = newpaths.size(); i < cnt; i++)
{

View File

@ -1759,6 +1759,9 @@ bool PluginManager::DropFile(const wxString &fileName)
{
auto module = static_cast<ModuleInterface *>
(mm.CreateProviderInstance(plug->GetID(), plug->GetPath()));
if (! module)
continue;
const auto &ff = module->InstallPath();
auto extensions = module->FileExtensions();
if (!ff.empty() &&