From 67303a64e1a7e6aa683ae39c54c32ad8bd0730ab Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 27 Jan 2013 02:36:18 +0000 Subject: 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 --- src/state.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/state.c') 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; -- cgit v1.2.1