From ce82537df9e4b832213138d942be4482418b9e50 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Sat, 15 Oct 2016 01:55:05 +0800 Subject: All external drop functions handles NULL. --- source/fitz/writer.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/fitz/writer.c') diff --git a/source/fitz/writer.c b/source/fitz/writer.c index d7fd60f9..fe9e8635 100644 --- a/source/fitz/writer.c +++ b/source/fitz/writer.c @@ -82,6 +82,9 @@ fz_close_document_writer(fz_context *ctx, fz_document_writer *wri) void fz_drop_document_writer(fz_context *ctx, fz_document_writer *wri) { + if (!wri) + return; + if (wri->close_writer) fz_warn(ctx, "dropping unclosed document writer"); if (wri->drop_writer) -- cgit v1.2.3