summaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/node.c b/src/node.c
index 73dde29..e8756ac 100644
--- a/src/node.c
+++ b/src/node.c
@@ -296,8 +296,8 @@ LILV_API
const char*
lilv_node_as_uri(const LilvNode* value)
{
- assert(lilv_node_is_uri(value));
- return (const char*)sord_node_get_string(value->node);
+ assert(!value || lilv_node_is_uri(value));
+ return value ? (const char*)sord_node_get_string(value->node) : NULL;
}
const SordNode*
@@ -318,8 +318,8 @@ LILV_API
const char*
lilv_node_as_blank(const LilvNode* value)
{
- assert(lilv_node_is_blank(value));
- return (const char*)sord_node_get_string(value->node);
+ assert(!value || lilv_node_is_blank(value));
+ return value ? (const char*)sord_node_get_string(value->node) : NULL;
}
LILV_API