aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/writer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/writer.c b/src/writer.c
index e2abf5a8..ffec736c 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -730,7 +730,9 @@ serd_writer_write_statement(SerdWriter* writer,
const SerdNode* const object = serd_statement_get_object(statement);
const SerdNode* const graph = serd_statement_get_graph(statement);
- if (!is_resource(subject) || !is_resource(predicate) || !object) {
+ if (!is_resource(subject) || !is_resource(predicate) || !object ||
+ ((flags & SERD_ANON_S) && (flags & SERD_LIST_S)) ||
+ ((flags & SERD_ANON_O) && (flags & SERD_LIST_O))) {
return SERD_ERR_BAD_ARG;
}