summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-01-27 02:36:18 +0000
committerDavid Robillard <d@drobilla.net>2013-01-27 02:36:18 +0000
commit67303a64e1a7e6aa683ae39c54c32ad8bd0730ab (patch)
treefba736ca6c9e125b1fd0f73b5e586bd63006651e /src
parent30521a822ee16b0945370543267f155b710c594b (diff)
downloadlilv-67303a64e1a7e6aa683ae39c54c32ad8bd0730ab.tar.gz
lilv-67303a64e1a7e6aa683ae39c54c32ad8bd0730ab.tar.bz2
lilv-67303a64e1a7e6aa683ae39c54c32ad8bd0730ab.zip
Don't print errors when loading plugin description as default state.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5010 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/state.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/state.c b/src/state.c
index 081aaf0..d693f1a 100644
--- a/src/state.c
+++ b/src/state.c
@@ -463,6 +463,12 @@ new_state_from_model(LilvWorld* world,
state->dir = lilv_strdup((const char*)sord_node_get_string(graph));
}
sord_iter_free(i);
+ } else if (sord_search(model,
+ node,
+ world->uris.rdf_a,
+ world->uris.lv2_Plugin, 0)) {
+ // Loading plugin description as state (default state)
+ state->plugin_uri = lilv_node_new_from_node(world, node);
} else {
LILV_ERRORF("State %s missing lv2:appliesTo property\n",
sord_node_get_string(node));
@@ -500,11 +506,7 @@ new_state_from_model(LilvWorld* world,
if (!symbol) {
LILV_ERRORF("State `%s' port missing symbol.\n",
sord_node_get_string(node));
- } else if (!value) {
- LILV_ERRORF("State `%s' port `%s' missing value.\n",
- sord_node_get_string(symbol),
- sord_node_get_string(node));
- } else {
+ } else if (value) {
chunk.len = 0;
sratom_read(sratom, &forge, world->world, model, value);
LV2_Atom* atom = (LV2_Atom*)chunk.buf;