From 45f02a1390bbea3f7acbef5fdb4807a9f9331f3d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 15 Jul 2014 19:48:59 +0000 Subject: Add lilv_world_unload_bundle() and lilv_world_unload_resource(). git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5413 a436a847-0d15-0410-975c-d299462d15a1 --- src/state.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/state.c') diff --git a/src/state.c b/src/state.c index 79b55ec..0a775c9 100644 --- a/src/state.c +++ b/src/state.c @@ -1,5 +1,5 @@ /* - Copyright 2007-2012 David Robillard + Copyright 2007-2014 David Robillard Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -439,6 +439,12 @@ new_state_from_model(LilvWorld* world, const SordNode* node, const char* dir) { + // Check that we know at least something about this state subject + if (!sord_ask(model, node, 0, 0, 0)) { + return NULL; + } + + // Allocate state LilvState* const state = (LilvState*)malloc(sizeof(LilvState)); memset(state, '\0', sizeof(LilvState)); state->dir = lilv_strdup(dir); -- cgit v1.2.1