aboutsummaryrefslogtreecommitdiffstats
path: root/src/n3.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/n3.c')
-rw-r--r--src/n3.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/n3.c b/src/n3.c
index a5299c38..bf65b038 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -1178,7 +1178,7 @@ read_object(SerdReader* reader, ReadContext* ctx, bool emit, bool* ate_dot)
o->flags = flags;
}
- if (!ret && emit && simple) {
+ if (!ret && emit && simple && o) {
ret = emit_statement(reader, *ctx, o);
} else if (!ret && !emit) {
ctx->object = o;
@@ -1408,6 +1408,7 @@ read_base(SerdReader* reader, bool sparql, bool token)
SerdNode* uri = NULL;
TRY(st, read_IRIREF(reader, &uri));
+ serd_node_zero_pad(uri);
TRY(st, serd_sink_write_base(reader->sink, uri));
read_ws_star(reader);
@@ -1448,6 +1449,8 @@ read_prefixID(SerdReader* reader, bool sparql, bool token)
SerdNode* uri = NULL;
TRY(st, read_IRIREF(reader, &uri));
+ serd_node_zero_pad(name);
+ serd_node_zero_pad(uri);
st = serd_sink_write_prefix(reader->sink, name, uri);
if (!sparql) {