aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-16 13:01:53 +0200
committerDavid Robillard <d@drobilla.net>2020-08-16 13:56:40 +0200
commitbb1a00aac2e2315a88ef0274455e510afa79ea95 (patch)
treef7c68d1271ba36c21830c1106dced71fdd51d5e2 /src/writer.c
parentfc81e2734ccc293f9d2755b700e8b437ee624560 (diff)
downloadserd-bb1a00aac2e2315a88ef0274455e510afa79ea95.tar.gz
serd-bb1a00aac2e2315a88ef0274455e510afa79ea95.tar.bz2
serd-bb1a00aac2e2315a88ef0274455e510afa79ea95.zip
Ensure that all free methods tolerate NULL
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/writer.c b/src/writer.c
index 81e0a845..5f312c30 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -978,6 +978,10 @@ serd_writer_set_prefix(SerdWriter* writer,
void
serd_writer_free(SerdWriter* writer)
{
+ if (!writer) {
+ return;
+ }
+
serd_writer_finish(writer);
serd_stack_free(&writer->anon_stack);
free(writer->bprefix);