aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/node.c b/src/node.c
index c2396c66..addaa07b 100644
--- a/src/node.c
+++ b/src/node.c
@@ -224,13 +224,13 @@ serd_node_new_file_uri(const uint8_t* const path,
}
}
- serd_chunk_sink_finish(&chunk);
+ const uint8_t* const string = serd_chunk_sink_finish(&chunk);
- if (out) {
- serd_uri_parse(chunk.buf, out);
+ if (string && out) {
+ serd_uri_parse(string, out);
}
- return serd_node_from_substring(SERD_URI, chunk.buf, chunk.len);
+ return serd_node_from_substring(SERD_URI, string, chunk.len);
}
SerdNode