diff options
-rw-r--r-- | platform/gl/gl-main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/gl/gl-main.c b/platform/gl/gl-main.c index e6a93680..ab8641b1 100644 --- a/platform/gl/gl-main.c +++ b/platform/gl/gl-main.c @@ -273,6 +273,11 @@ void render_page(void) pix = fz_new_pixmap_from_annot(ctx, annot, &page_ctm, fz_device_rgb(ctx), 1); texture_from_pixmap(&annot_tex[annot_count++], pix); fz_drop_pixmap(ctx, pix); + if (annot_count >= nelem(annot_tex)) + { + fz_warn(ctx, "too many annotations to display!"); + break; + } } } |