summaryrefslogtreecommitdiff
path: root/src/raptor_sax2.c
diff options
context:
space:
mode:
authorDave Beckett <dave@dajobe.org>2010-04-17 11:24:01 -0700
committerDave Beckett <dave@dajobe.org>2010-04-17 11:24:01 -0700
commitdad0566ef288e6330abf7144b6d644dbd6c11341 (patch)
tree8cee091376bb1e54ee6f0b0b12b9955351ca9844 /src/raptor_sax2.c
parent0b8d836b1592c4bd06c45062011fd4b155e6856b (diff)
downloadraptor-dad0566ef288e6330abf7144b6d644dbd6c11341.tar.gz
Make all constructors check for non-NULL args/world and call raptor_world_open()
Adjusted some documentation to allow NULL args that weren't noted, such as raptor_new_turtle_writer() can take a NULL base_uri.
Diffstat (limited to 'src/raptor_sax2.c')
-rw-r--r--src/raptor_sax2.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/raptor_sax2.c b/src/raptor_sax2.c
index c6bcfc30..e3677d96 100644
--- a/src/raptor_sax2.c
+++ b/src/raptor_sax2.c
@@ -80,6 +80,14 @@ raptor_new_sax2(raptor_world *world, raptor_locator *locator,
void* user_data)
{
raptor_sax2* sax2;
+
+ if(!locator)
+ return NULL;
+
+ RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL);
+
+ raptor_world_open(world);
+
sax2 = (raptor_sax2*)RAPTOR_CALLOC(raptor_sax2, 1, sizeof(*sax2));
if(!sax2)
return NULL;