aboutsummaryrefslogtreecommitdiffstats
path: root/src/reader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/reader.c')
-rw-r--r--src/reader.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/reader.c b/src/reader.c
index 4710caac..5d33e45d 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -218,6 +218,10 @@ serd_reader_set_error_sink(SerdReader* reader,
void
serd_reader_free(SerdReader* reader)
{
+ if (!reader) {
+ return;
+ }
+
pop_node(reader, reader->rdf_nil);
pop_node(reader, reader->rdf_rest);
pop_node(reader, reader->rdf_first);