summaryrefslogtreecommitdiffstats
path: root/src/plugin.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-01-04 19:21:12 +0000
committerDavid Robillard <d@drobilla.net>2012-01-04 19:21:12 +0000
commit7823f743ee0c748ff4ced56838cd737516d857ab (patch)
tree083bcfd6edb27c53aa217da644f650e86f270070 /src/plugin.c
parent2f71e8570bcd37ad681bde7d51c433701a0028ab (diff)
downloadlilv-7823f743ee0c748ff4ced56838cd737516d857ab.tar.gz
lilv-7823f743ee0c748ff4ced56838cd737516d857ab.tar.bz2
lilv-7823f743ee0c748ff4ced56838cd737516d857ab.zip
Implement proper support for LV2_STATE_BUNDLE.
Test saving state to default bundle path. Fix memory leaks. git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3915 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/plugin.c')
-rw-r--r--src/plugin.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/plugin.c b/src/plugin.c
index 2a7ccee..2bb70c4 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -217,17 +217,20 @@ lilv_plugin_load_ports_if_necessary(const LilvPlugin* const_p)
LilvNode* symbol = lilv_plugin_get_unique(
p, port, p->world->lv2_symbol_node);
+ bool error = false;
if (!lilv_node_is_string(symbol) || !is_symbol(symbol->str_val)) {
LILV_ERRORF("Plugin <%s> port symbol `%s' is invalid\n",
lilv_node_as_uri(p->plugin_uri),
lilv_node_as_string(symbol));
- goto error;
+ error = true;
+ goto done;
}
if (!lilv_node_is_int(index)) {
LILV_ERRORF("Plugin <%s> port index is not an integer\n",
lilv_node_as_uri(p->plugin_uri));
- goto error;
+ error = true;
+ goto done;
}
uint32_t this_index = lilv_node_as_int(index);
@@ -265,13 +268,13 @@ lilv_plugin_load_ports_if_necessary(const LilvPlugin* const_p)
}
lilv_match_end(types);
- continue;
-
- error:
+ done:
lilv_node_free(symbol);
lilv_node_free(index);
- lilv_plugin_free_ports(p);
- break; // Invalid plugin
+ if (error) { // Invalid plugin
+ lilv_plugin_free_ports(p);
+ break;
+ }
}
lilv_match_end(ports);