diff options
author | Robin Watts <robin.watts@artifex.com> | 2011-11-15 15:21:45 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2011-11-15 15:21:45 +0000 |
commit | 6610ebcb477e204605a1a3dd95e89b03382ee760 (patch) | |
tree | 95d96f950b0a6b08a7aaf317e69052260b8b121c /fitz/stm_open.c | |
parent | 9c0a49060475b2dea1e4c2668bebd1d566113a7b (diff) | |
download | mupdf-6610ebcb477e204605a1a3dd95e89b03382ee760.tar.xz |
Error, don't crash on file not found.
Throw an error rather than returning NULL from fz_open_file.
Diffstat (limited to 'fitz/stm_open.c')
-rw-r--r-- | fitz/stm_open.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fitz/stm_open.c b/fitz/stm_open.c index 18079f4b..dfbc42ae 100644 --- a/fitz/stm_open.c +++ b/fitz/stm_open.c @@ -98,7 +98,7 @@ fz_open_file(fz_context *ctx, const char *name) { int fd = open(name, O_BINARY | O_RDONLY, 0); if (fd == -1) - return NULL; + fz_throw(ctx, "Failed to open %s", name); return fz_open_fd(ctx, fd); } |