Defensive coding for plugin filtering.
This commit is contained in:
@@ -500,6 +500,7 @@ export const LoadPluginDialog =
|
||||
|
||||
for (let i = 0; i < plugins.length; ++i) {
|
||||
let plugin = plugins[i];
|
||||
try {
|
||||
if (filterType === PluginType.Plugin || rootClass.is_type_of(filterType, plugin.plugin_type)) {
|
||||
let score: number = 0;
|
||||
if (plugin.is_vst3) {
|
||||
@@ -515,6 +516,10 @@ export const LoadPluginDialog =
|
||||
results.push({ score: score, plugin: plugin });
|
||||
}
|
||||
}
|
||||
} catch (e)
|
||||
{
|
||||
alert("Bad plugin:" + (plugin?.name??"null") + " plugin type: " + (plugin?.plugin_type??"null"));
|
||||
}
|
||||
}
|
||||
results.sort((left: { score: number; plugin: UiPlugin }, right: { score: number; plugin: UiPlugin }) => {
|
||||
if (right.score < left.score) return -1;
|
||||
|
||||
Reference in New Issue
Block a user