aboutsummaryrefslogtreecommitdiffstats
path: root/src/env.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/env.c')
-rw-r--r--src/env.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/env.c b/src/env.c
index 66698c12..0fd603a9 100644
--- a/src/env.c
+++ b/src/env.c
@@ -130,6 +130,8 @@ serd_env_base_uri(const SerdEnv* const env)
SerdStatus
serd_env_set_base_uri(SerdEnv* const env, const SerdStringView uri)
{
+ assert(env);
+
if (!uri.len) {
serd_nodes_deref(env->nodes, env->base_uri_node);
env->base_uri_node = NULL;
@@ -195,6 +197,8 @@ serd_env_set_prefix(SerdEnv* const env,
const SerdStringView name,
const SerdStringView uri)
{
+ assert(env);
+
if (serd_uri_string_has_scheme(uri.buf)) {
// Set prefix to absolute URI
serd_env_add(env, name, serd_nodes_uri(env->nodes, uri));
@@ -327,6 +331,9 @@ serd_env_expand_node(const SerdEnv* const env, const SerdNode* const node)
void
serd_env_write_prefixes(const SerdEnv* const env, const SerdSink* const sink)
{
+ assert(env);
+ assert(sink);
+
for (size_t i = 0; i < env->n_prefixes; ++i) {
serd_sink_write_prefix(sink, env->prefixes[i].name, env->prefixes[i].uri);
}