diff options
-rw-r--r-- | fitz/stm_open.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fitz/stm_open.c b/fitz/stm_open.c index dfbc42ae..aa99451b 100644 --- a/fitz/stm_open.c +++ b/fitz/stm_open.c @@ -41,6 +41,8 @@ fz_keep_stream(fz_stream *stm) void fz_close(fz_stream *stm) { + if (stm == NULL) + return; stm->refs --; if (stm->refs == 0) { |