summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-11-17 21:33:42 +0000
committerDavid Robillard <d@drobilla.net>2012-11-17 21:33:42 +0000
commite04c114e90b37ff7ed6a479205875616e6afce1f (patch)
treeb08ba70efc4fa502d410d1fe709375c14c7f57db /src
parent4224c0f6fcb53d1c8b70259a7c2ce078a88d24dd (diff)
downloadingen-e04c114e90b37ff7ed6a479205875616e6afce1f.tar.gz
ingen-e04c114e90b37ff7ed6a479205875616e6afce1f.tar.bz2
ingen-e04c114e90b37ff7ed6a479205875616e6afce1f.zip
Gracefully ignore plugins with invalid ports.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4826 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/server/BlockFactory.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/server/BlockFactory.cpp b/src/server/BlockFactory.cpp
index 9ae1fddb..484e0c63 100644
--- a/src/server/BlockFactory.cpp
+++ b/src/server/BlockFactory.cpp
@@ -18,6 +18,7 @@
#include "lilv/lilv.h"
+#include "ingen/Log.hpp"
#include "ingen/World.hpp"
#include "internals/Controller.hpp"
#include "internals/Delay.hpp"
@@ -120,8 +121,12 @@ BlockFactory::load_lv2_plugins()
const LilvPlugins* plugins = lilv_world_get_all_plugins(_world->lilv_world());
LILV_FOREACH(plugins, i, plugins) {
const LilvPlugin* lv2_plug = lilv_plugins_get(plugins, i);
-
- const Raul::URI uri(lilv_node_as_uri(lilv_plugin_get_uri(lv2_plug)));
+ const Raul::URI uri(lilv_node_as_uri(lilv_plugin_get_uri(lv2_plug)));
+ if (!lilv_plugin_get_port_by_index(lv2_plug, 0)) {
+ _world->log().warn(
+ Raul::fmt("Ignoring plugin <%1%> with invalid ports\n") % uri);
+ continue;
+ }
if (_plugins.find(uri) != _plugins.end()) {
continue;