aboutsummaryrefslogtreecommitdiffstats
path: root/src/reader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/reader.c')
-rw-r--r--src/reader.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/reader.c b/src/reader.c
index 1936808a..aa24a9ca 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -200,6 +200,7 @@ serd_reader_new(const SerdSyntax syntax,
void
serd_reader_set_strict(SerdReader* const reader, const bool strict)
{
+ assert(reader);
reader->strict = strict;
}
@@ -208,6 +209,7 @@ serd_reader_set_error_sink(SerdReader* const reader,
const SerdErrorSink error_sink,
void* const error_handle)
{
+ assert(reader);
reader->error_sink = error_sink;
reader->error_handle = error_handle;
}
@@ -392,6 +394,9 @@ serd_reader_read_file_handle(SerdReader* const reader,
FILE* const file,
const uint8_t* const name)
{
+ assert(reader);
+ assert(file);
+
return serd_reader_read_source(reader,
(SerdSource)fread,
(SerdStreamErrorFunc)ferror,