aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-03-10 18:01:04 +0100
committerDavid Robillard <d@drobilla.net>2019-04-13 19:48:23 +0200
commit1ced0a4938fa11e981f652505cd9dfc79c3c629a (patch)
tree4171642f60b92fb816bdd612052521547f70e155
parent9a22b24d96e89abc403cff82f50fe4db991aecb8 (diff)
downloadserd-1ced0a4938fa11e981f652505cd9dfc79c3c629a.tar.gz
serd-1ced0a4938fa11e981f652505cd9dfc79c3c629a.tar.bz2
serd-1ced0a4938fa11e981f652505cd9dfc79c3c629a.zip
Tolerate lack of predicate when context is popped
-rw-r--r--src/writer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/writer.c b/src/writer.c
index ee935269..241ff69f 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -896,7 +896,8 @@ serd_writer_end_anon(SerdWriter* writer,
writer->context = *anon_stack_top(writer);
serd_stack_pop(&writer->anon_stack, sizeof(WriteContext));
- 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
writer->context.predicate->type = SERD_NOTHING;
}