Skip to content

Commit

Permalink
source/html/html-layout.c: fix SEGV with empty <hN> header block.
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-smith-artifex-com committed Jun 7, 2024
1 parent b7a4610 commit b084345
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/html/html-layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -2601,7 +2601,7 @@ static int enumerate_block_box(fz_context *ctx, fz_html_box *box, float page_top
/* We have a box worthy of a callback. */
char *text = NULL;
pos.text = NULL;
if (heading)
if (heading && box->down)
pos.text = text = gather_text(ctx, box->down);
pos.depth = depth;
pos.heading = heading;
Expand Down

0 comments on commit b084345

Please sign in to comment.