diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-01-24 00:22:44 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-01-24 00:22:44 +0000 |
commit | dbbd539088760077581f72787ca9adbbeb9e569e (patch) | |
tree | bafaaa82958f41d4658af304f7c755fe8d2cfa94 /xps | |
parent | c29b6a615260d140c2dc04a05fa47c43e66d6f35 (diff) | |
download | mupdf-dbbd539088760077581f72787ca9adbbeb9e569e.tar.xz |
Make xps_free_context cope with NULL arg.
All destructors should accept NULL.
Diffstat (limited to 'xps')
-rw-r--r-- | xps/xps_zip.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xps/xps_zip.c b/xps/xps_zip.c index 04e37f4f..cc7fbb5e 100644 --- a/xps/xps_zip.c +++ b/xps/xps_zip.c @@ -541,6 +541,9 @@ xps_free_context(xps_document *doc) xps_font_cache *font, *next; int i; + if (!doc) + return; + if (doc->file) fz_close(doc->file); |