summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-12-04 21:24:05 -0500
committerDavid Robillard <d@drobilla.net>2015-12-04 21:24:05 -0500
commit19cd4c95e10ec83f8fbf41809e9d3688c64bd2d8 (patch)
treea13f722fbf4111e61dd6618ad40cc9e2e085ef6c /src
parentf391b49c87f152fbfee73890de1a9985fe9b81c2 (diff)
downloadsord-19cd4c95e10ec83f8fbf41809e9d3688c64bd2d8.tar.gz
sord-19cd4c95e10ec83f8fbf41809e9d3688c64bd2d8.tar.bz2
sord-19cd4c95e10ec83f8fbf41809e9d3688c64bd2d8.zip
Return inserter error when node can not be written
Diffstat (limited to 'src')
-rw-r--r--src/syntax.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/syntax.c b/src/syntax.c
index f17312f..ee9fec1 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -78,6 +78,10 @@ sord_inserter_write_statement(SordInserter* inserter,
SordNode* o = sord_node_from_serd_node(world, env, object,
object_datatype, object_lang);
+ if (!s || !p || !o) {
+ return SERD_ERR_BAD_ARG;
+ }
+
const SordQuad tup = { s, p, o, g };
sord_add(inserter->model, tup);