summaryrefslogtreecommitdiff
path: root/source/cbz/muimg.c
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2018-09-26 03:31:05 +0800
committerTor Andersson <tor.andersson@artifex.com>2018-10-23 18:46:01 +0200
commitfaf47b94e24314d74907f3f6bc874105f2c962ed (patch)
tree4318114dc2c859ac8b16daa23f99a53965883909 /source/cbz/muimg.c
parent80b8bab588f99d650d75e6567333b45032418478 (diff)
downloadmupdf-faf47b94e24314d74907f3f6bc874105f2c962ed.tar.xz
Throw when page number is out of range.
Other code depends on this and does not handle a page pointer being NULL well.
Diffstat (limited to 'source/cbz/muimg.c')
-rw-r--r--source/cbz/muimg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/cbz/muimg.c b/source/cbz/muimg.c
index b54371fa..fb075307 100644
--- a/source/cbz/muimg.c
+++ b/source/cbz/muimg.c
@@ -82,7 +82,7 @@ img_load_page(fz_context *ctx, fz_document *doc_, int number)
img_page *page = NULL;
if (number < 0 || number >= doc->page_count)
- return NULL;
+ fz_throw(ctx, FZ_ERROR_GENERIC, "cannot load page %d", number);
fz_var(pixmap);
fz_var(image);