diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lilv_config.h | 4 | ||||
-rw-r--r-- | src/state.c | 14 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/lilv_config.h b/src/lilv_config.h index 2533384..2c00901 100644 --- a/src/lilv_config.h +++ b/src/lilv_config.h @@ -1,11 +1,11 @@ -// Copyright 2021 David Robillard <d@drobilla.net> +// Copyright 2021-2024 David Robillard <d@drobilla.net> // SPDX-License-Identifier: ISC #ifndef LILV_CONFIG_H #define LILV_CONFIG_H // Define version unconditionally so a warning will catch a mismatch -#define LILV_VERSION "0.24.22" +#define LILV_VERSION "0.24.23" // Separator between entries in variables like PATH #ifndef LILV_PATH_SEP diff --git a/src/state.c b/src/state.c index c8e8f14..cc4d950 100644 --- a/src/state.c +++ b/src/state.c @@ -756,11 +756,15 @@ lilv_state_new_from_file(LilvWorld* world, return NULL; } - uint8_t* abs_path = (uint8_t*)zix_canonical_path(NULL, path); - SerdNode node = serd_node_new_file_uri(abs_path, NULL, NULL, true); - SerdEnv* env = serd_env_new(&node); - SordModel* model = sord_new(world->world, SORD_SPO, false); - SerdReader* reader = sord_new_reader(model, env, SERD_TURTLE, NULL); + uint8_t* const abs_path = (uint8_t*)zix_canonical_path(NULL, path); + if (!abs_path) { + return NULL; + } + + SerdNode node = serd_node_new_file_uri(abs_path, NULL, NULL, true); + SerdEnv* env = serd_env_new(&node); + SordModel* model = sord_new(world->world, SORD_SPO, false); + SerdReader* reader = sord_new_reader(model, env, SERD_TURTLE, NULL); serd_reader_read_file(reader, node.buf); |