Skip to content

Commit

Permalink
main: catch ENOMEM from the 2nd pass.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilk committed Jul 18, 2022
1 parent 3600046 commit 71ed67f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1504,6 +1504,11 @@ static int xmain(int argc, char * const argv[])
{ /* Render the page second time, without skipping any elements. */
debug(3) << _("rendering page (2nd pass)") << std::endl;
doc->display_page(out1.get(), m, dpi, dpi, crop, false);
if (out1->getBitmapWidth() != width || out1->getBitmapHeight() != height)
{
errno = ENOMEM;
throw_posix_error("");
}
}
debug(3) << _("preparing data for `csepdjvu`") << std::endl;
debug(0)++;
Expand Down

0 comments on commit 71ed67f

Please sign in to comment.