summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac8
-rw-r--r--src/RDFNode.cpp2
2 files changed, 6 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index fe7a8b4..be911ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,11 +68,11 @@ if test "$debug_symbols" = "yes"; then
fi
if test "$debug_assertions" = "yes"; then
- CFLAGS="$CFLAGS -DDEBUG"
- CXXFLAGS="$CXXFLAGS -DDEBUG"
+ CFLAGS="$CFLAGS -DDEBUG -DLIBRDF_DEBUG"
+ CXXFLAGS="$CXXFLAGS -DDEBUG -DLIBRDF_DEBUG"
else
- CFLAGS="$CFLAGS -DNDEBUG"
- CXXFLAGS="$CXXFLAGS -DNDEBUG"
+ CFLAGS="$CFLAGS -DNDEBUG -DLIBRDF_DEBUG"
+ CXXFLAGS="$CXXFLAGS -DNDEBUG -DLIBRDF_DEBUG"
fi
# Boost shared_ptr debugging
diff --git a/src/RDFNode.cpp b/src/RDFNode.cpp
index 01c0ffb..d70389e 100644
--- a/src/RDFNode.cpp
+++ b/src/RDFNode.cpp
@@ -88,6 +88,7 @@ Node::to_string() const
{
const Type type = this->type();
if (type == RESOURCE) {
+ assert(librdf_node_get_uri(_node));
return string((const char*)librdf_uri_as_string(librdf_node_get_uri(_node)));
} else if (type == LITERAL) {
return string((const char*)librdf_node_get_literal_value(_node));
@@ -103,6 +104,7 @@ string
Node::to_quoted_uri_string() const
{
assert(type() == RESOURCE);
+ assert(librdf_node_get_uri(_node));
string str = "<";
str.append((const char*)librdf_uri_as_string(librdf_node_get_uri(_node)));
str.append(">");