From 4ab00e3644a78fec742657d46f94421eb85d086f Mon Sep 17 00:00:00 2001 From: Duan Yao Date: Tue, 17 Jun 2014 17:33:37 +0800 Subject: [PATCH] Add check of nullptr to fallback_bg_renderer; remove outdated comment. --- src/HTMLRenderer/general.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/HTMLRenderer/general.cc b/src/HTMLRenderer/general.cc index 9d24c60..a2be519 100644 --- a/src/HTMLRenderer/general.cc +++ b/src/HTMLRenderer/general.cc @@ -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);