diff options
author | David Robillard <d@drobilla.net> | 2014-07-15 19:48:59 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-07-15 19:48:59 +0000 |
commit | 45f02a1390bbea3f7acbef5fdb4807a9f9331f3d (patch) | |
tree | c0a04698cdc1d392b5671ebe3c20d302acae61bf /src/state.c | |
parent | c067725cf5c187bca3c7b9a41c8b90a8ce50d95d (diff) | |
download | lilv-45f02a1390bbea3f7acbef5fdb4807a9f9331f3d.tar.gz lilv-45f02a1390bbea3f7acbef5fdb4807a9f9331f3d.tar.bz2 lilv-45f02a1390bbea3f7acbef5fdb4807a9f9331f3d.zip |
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
Diffstat (limited to 'src/state.c')
-rw-r--r-- | src/state.c | 8 |
1 files changed, 7 insertions, 1 deletions
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 <http://drobilla.net> + Copyright 2007-2014 David Robillard <http://drobilla.net> 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); |