From 2a7e7959e5ad711d739c92a76c9701272d835cb9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 4 Nov 2015 18:26:41 +0000 Subject: Fix restoring state from strings Patch from falktx, fixes #1107. git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5809 a436a847-0d15-0410-975c-d299462d15a1 --- src/state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/state.c b/src/state.c index 15de044..9bc1d6d 100644 --- a/src/state.c +++ b/src/state.c @@ -499,7 +499,7 @@ new_state_from_model(LilvWorld* world, const SordNode* object = sord_iter_get_node(i, SORD_OBJECT); const SordNode* graph = sord_iter_get_node(i, SORD_GRAPH); state->label = lilv_strdup((const char*)sord_node_get_string(object)); - if (!state->dir) { + if (!state->dir && graph) { state->dir = lilv_strdup((const char*)sord_node_get_string(graph)); } sord_iter_free(i); -- cgit v1.2.1