diff options
Diffstat (limited to 'xps/xps_outline.c')
-rw-r--r-- | xps/xps_outline.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/xps/xps_outline.c b/xps/xps_outline.c index 2255c51d..fc4572db 100644 --- a/xps/xps_outline.c +++ b/xps/xps_outline.c @@ -121,11 +121,20 @@ xps_load_outline(xps_document *doc) xps_fixdoc *fixdoc; fz_outline *head = NULL, *tail, *outline; - for (fixdoc = doc->first_fixdoc; fixdoc; fixdoc = fixdoc->next) { - if (fixdoc->outline) { - outline = xps_load_document_structure(doc, fixdoc); + for (fixdoc = doc->first_fixdoc; fixdoc; fixdoc = fixdoc->next) + { + if (fixdoc->outline) + { + fz_try(doc->ctx) + { + outline = xps_load_document_structure(doc, fixdoc); + } + fz_catch(doc->ctx) { + outline = NULL; + } if (!outline) continue; + if (!head) head = outline; else |