1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 13:00:08 +00:00

Add check of nullptr to fallback_bg_renderer; remove outdated comment.

This commit is contained in:
Duan Yao 2014-06-17 17:33:37 +08:00
parent 69ceff7dbd
commit 4ab00e3644

View File

@ -142,9 +142,6 @@ void HTMLRenderer::process(PDFDoc *doc)
cur_page_filename = filled_template_filename;
}
// We handle covered texts during doc->displayPage(this...),
// and bg_renderer->render_page() depends on the result, so it must be called after
// doc->displayPage(this...).
doc->displayPage(this, i,
text_zoom_factor() * DEFAULT_DPI, text_zoom_factor() * DEFAULT_DPI,
0,
@ -153,8 +150,6 @@ void HTMLRenderer::process(PDFDoc *doc)
false, // printing
nullptr, nullptr, nullptr, nullptr);
if(param.split_pages)
{
delete f_curpage;
@ -245,7 +240,7 @@ void HTMLRenderer::endPage() {
{
if (bg_renderer->render_page(cur_doc, pageNum))
bg_renderer->embed_image(pageNum);
else
else if (fallback_bg_renderer != nullptr)
{
if (fallback_bg_renderer->render_page(cur_doc, pageNum))
fallback_bg_renderer->embed_image(pageNum);