diff options
-rw-r--r-- | draw/draw_device.c | 1 | ||||
-rw-r--r-- | fitz/base_error.c | 4 | ||||
-rw-r--r-- | fitz/base_xml.c | 3 | ||||
-rw-r--r-- | fitz/dev_null.c | 1 | ||||
-rw-r--r-- | pdf/pdf_annot.c | 6 | ||||
-rw-r--r-- | xps/xps_outline.c | 3 |
6 files changed, 12 insertions, 6 deletions
diff --git a/draw/draw_device.c b/draw/draw_device.c index 0c4ca2b2..1622f2c9 100644 --- a/draw/draw_device.c +++ b/draw/draw_device.c @@ -1658,7 +1658,6 @@ fz_draw_begin_tile(fz_device *devp, const fz_rect *area, const fz_rect *view, fl { emergency_pop_stack(dev, state); } - } static void diff --git a/fitz/base_error.c b/fitz/base_error.c index 5ec97a0a..de41c023 100644 --- a/fitz/base_error.c +++ b/fitz/base_error.c @@ -95,8 +95,10 @@ int fz_push_try(fz_error_context *ex) * immediately - returning 0 stops the setjmp happening and takes us * direct to the always/catch clauses. */ assert(ex->top == nelem(ex->stack)-1); - strcpy(ex->message, "exception stack overflow!\n"); + strcpy(ex->message, "exception stack overflow!"); ex->stack[ex->top].code = 2; + fprintf(stderr, "error: %s\n", ex->message); + LOGE("error: %s\n", ex->message); return 0; } diff --git a/fitz/base_xml.c b/fitz/base_xml.c index 37cdc7b1..170ee93d 100644 --- a/fitz/base_xml.c +++ b/fitz/base_xml.c @@ -93,7 +93,8 @@ static void xml_free_attribute(fz_context *ctx, struct attribute *att) void fz_free_xml(fz_context *ctx, fz_xml *item) { - while (item) { + while (item) + { fz_xml *next = item->next; if (item->text) fz_free(ctx, item->text); diff --git a/fitz/dev_null.c b/fitz/dev_null.c index 4a32d4b9..e7d31fdf 100644 --- a/fitz/dev_null.c +++ b/fitz/dev_null.c @@ -342,6 +342,7 @@ fz_end_tile(fz_device *dev) dev->error_depth--; if (dev->error_depth == 0) fz_throw(dev->ctx, "%s", dev->errmess); + return; } if (dev->end_tile) dev->end_tile(dev); diff --git a/pdf/pdf_annot.c b/pdf/pdf_annot.c index 9513bf1a..5b152592 100644 --- a/pdf/pdf_annot.c +++ b/pdf/pdf_annot.c @@ -361,7 +361,7 @@ pdf_load_annots(pdf_document *xref, pdf_obj *annots, pdf_page *page) { pdf_annot *annot, *head, *tail; pdf_obj *obj, *ap, *as, *n, *rect; - int i, len; + int i, len, is_dict; fz_context *ctx = xref->ctx; fz_var(annot); @@ -380,13 +380,15 @@ pdf_load_annots(pdf_document *xref, pdf_obj *annots, pdf_page *page) rect = pdf_dict_gets(obj, "Rect"); ap = pdf_dict_gets(obj, "AP"); as = pdf_dict_gets(obj, "AS"); + is_dict = pdf_is_dict(ap); } fz_catch(ctx) { ap = NULL; + is_dict = 0; } - if (!pdf_is_dict(ap)) + if (!is_dict) continue; annot = NULL; diff --git a/xps/xps_outline.c b/xps/xps_outline.c index fc4572db..aa1121d1 100644 --- a/xps/xps_outline.c +++ b/xps/xps_outline.c @@ -129,7 +129,8 @@ xps_load_outline(xps_document *doc) { outline = xps_load_document_structure(doc, fixdoc); } - fz_catch(doc->ctx) { + fz_catch(doc->ctx) + { outline = NULL; } if (!outline) |