diff options
author | David Robillard <d@drobilla.net> | 2019-12-18 15:30:31 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-06-21 18:12:04 +0200 |
commit | c5d91a5292fc898fbccd36b00b4b0862ddec9588 (patch) | |
tree | 11433493d7c074cea7abe80d03c70037fd6bd110 | |
parent | 16a54b47102401b2ff819d6bda95547975f7ac53 (diff) | |
download | serd-c5d91a5292fc898fbccd36b00b4b0862ddec9588.tar.gz serd-c5d91a5292fc898fbccd36b00b4b0862ddec9588.tar.bz2 serd-c5d91a5292fc898fbccd36b00b4b0862ddec9588.zip |
Fix crash when expanding empty URI prefixes
-rw-r--r-- | src/env.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -265,7 +265,7 @@ serd_env_expand_in_place(const SerdEnv* env, const SerdPrefix* const prefix = serd_env_find(env, str, name_len); if (prefix) { uri_prefix->buf = serd_node_get_string(prefix->uri); - uri_prefix->len = prefix->uri->n_bytes; + uri_prefix->len = prefix->uri ? prefix->uri->n_bytes : 0; uri_suffix->buf = colon + 1; uri_suffix->len = curie->n_bytes - name_len - 1; return SERD_SUCCESS; |