summaryrefslogtreecommitdiff
path: root/fitz/stm_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'fitz/stm_buffer.c')
-rw-r--r--fitz/stm_buffer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fitz/stm_buffer.c b/fitz/stm_buffer.c
index f01e5b19..7f9d521d 100644
--- a/fitz/stm_buffer.c
+++ b/fitz/stm_buffer.c
@@ -25,9 +25,10 @@ fz_new_buffer(fz_context *ctx, int size)
}
fz_buffer *
-fz_keep_buffer(fz_buffer *buf)
+fz_keep_buffer(fz_context *ctx, fz_buffer *buf)
{
- buf->refs ++;
+ if (buf)
+ buf->refs ++;
return buf;
}