diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-09-03 19:44:08 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-09-04 19:13:08 +0100 |
commit | 2db473fda414d32872ed2b460fdf271ec87c00da (patch) | |
tree | 168c24a0977d4cba4fcfe7ddcdd2a379e0902031 | |
parent | 0cd78c0a12ebc84b56a58016fbcc83aefba64e1a (diff) | |
download | mupdf-2db473fda414d32872ed2b460fdf271ec87c00da.tar.xz |
Tweak fz_keep_stream to cope with NULL.
Simplifies coding.
-rw-r--r-- | fitz/stm_open.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fitz/stm_open.c b/fitz/stm_open.c index 3d605e1a..f3d78b9d 100644 --- a/fitz/stm_open.c +++ b/fitz/stm_open.c @@ -42,7 +42,8 @@ fz_new_stream(fz_context *ctx, void *state, fz_stream * fz_keep_stream(fz_stream *stm) { - stm->refs ++; + if (stm) + stm->refs ++; return stm; } |