aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-03-10 18:01:04 +0100
committerDavid Robillard <d@drobilla.net>2022-01-13 23:04:09 -0500
commitd30f90cae709a9192aa29f219a494c62b865e0f8 (patch)
treed2f1e437899c8db58d6854d13e9dabe22df1805b /src/writer.c
parent4d51668a2f9bcc143a5ac00208d588cd9fb4e2a1 (diff)
downloadserd-d30f90cae709a9192aa29f219a494c62b865e0f8.tar.gz
serd-d30f90cae709a9192aa29f219a494c62b865e0f8.tar.bz2
serd-d30f90cae709a9192aa29f219a494c62b865e0f8.zip
Tolerate popping writer contexts with no predicate
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/writer.c b/src/writer.c
index fb13fa96..e0db3a06 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -1001,7 +1001,8 @@ serd_writer_end_anon(SerdWriter* writer, const SerdNode* node)
write_sep(writer, writer->context.flags, SEP_ANON_END);
pop_context(writer);
- if (serd_node_equals(node, writer->context.subject)) {
+ if (writer->context.predicate &&
+ serd_node_equals(node, writer->context.subject)) {
// Now-finished anonymous node is the new subject with no other context
memset(writer->context.predicate, 0, sizeof(SerdNode));
}