Can't catch the error of page creation
Hello.
I faced with catching an error problem. I try to create a page, but the program prints me
poppler/error: Failed to parse XRef entry [733].poppler/error: Top-level pages object is wrong type (null)
My code for catching such a problems looks like this
poppler::page* p;
if((p = pDoc_pdf->create_page(i)) == NULL)
{
corrupted_pages[filepath].push_back(i);
continue;
}
pdf_text = p->text();
According to the documentation here the function create_page should return exactly NULL if something goes wrong. Unfortunately, it doesn't work and when I try to get the text, the program crashes. Digging into the code of poppler, I realized, that it actually would return the nullptr, so I tried to replace the NULL to nullptr. However, it doesn't work and the condition is passed anyway.
I attached the file, that causes an error.
Thank for the help.