Commit 2cd79c73 authored by Adam Reichold's avatar Adam Reichold Committed by Albert Astals Cid

[cpp] construct a font_iterator instance in the local storage of...

[cpp] construct a font_iterator instance in the local storage of page_private::init_font_info_cache() method, instead of the heap
parent 7279b4eb
......@@ -61,14 +61,12 @@ size_t page_private::init_font_info_cache()
if (font_info_cache.size() > 0)
return font_info_cache.size();
poppler::font_iterator* font_iterator = new poppler::font_iterator(index, doc);
poppler::font_iterator it(index, doc);
if (font_iterator->has_next()) {
font_info_cache = font_iterator->next();
if (it.has_next()) {
font_info_cache = it.next();
}
delete font_iterator;
return font_info_cache.size();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment