From 706bda4d4759f83a5ba2c532dc9b6a98bfde71f1 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 26 Jan 2011 03:33:24 +0000 Subject: Tolerate NULL base URI. git-svn-id: http://svn.drobilla.net/serd/trunk@83 490d8e77-9747-427b-9fa3-0b8f29cee8a0 --- src/serdi.c | 3 ++- src/writer.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/serdi.c b/src/serdi.c index 496531b5..7a275e36 100644 --- a/src/serdi.c +++ b/src/serdi.c @@ -251,7 +251,8 @@ main(int argc, char** argv) }; SerdReader reader = serd_reader_new( - SERD_TURTLE, &state, event_base, event_prefix, event_statement, event_end); + SERD_TURTLE, &state, + event_base, event_prefix, event_statement, event_end); const bool success = (from_file) ? serd_reader_read_file(reader, in_fd, input) diff --git a/src/writer.c b/src/writer.c index 8010dba3..9ba02489 100644 --- a/src/writer.c +++ b/src/writer.c @@ -368,7 +368,7 @@ serd_writer_new(SerdSyntax syntax, writer->syntax = syntax; writer->style = style; writer->env = env; - writer->base_uri = *base_uri; + writer->base_uri = base_uri ? *base_uri : SERD_URI_NULL; writer->anon_stack = serd_stack_new(sizeof(WriteContext)); writer->sink = sink; writer->stream = stream; -- cgit v1.2.1