diff options
author | David Robillard <d@drobilla.net> | 2019-12-18 15:30:31 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-10-27 13:13:59 +0100 |
commit | b6b777a0c0145449bce9855bc3851ad1b5edf409 (patch) | |
tree | cf45878aa51a82f89c39c7f48cb9a34aad454150 | |
parent | b187e0541e9ac422168fc436429e79fbe70de7a7 (diff) | |
download | serd-b6b777a0c0145449bce9855bc3851ad1b5edf409.tar.gz serd-b6b777a0c0145449bce9855bc3851ad1b5edf409.tar.bz2 serd-b6b777a0c0145449bce9855bc3851ad1b5edf409.zip |
Fix crash when expanding empty URI prefixes
-rw-r--r-- | src/env.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -281,7 +281,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_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; |