Commit 7ccb475d authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Fix crash on files that have the same signature in more than 1 page

It happens with some official documents where they use the same
signature in all pages to make it clear all pages are signed/official

BUGS: 426467
parent 56a23a80
Pipeline #34527 passed with stage
in 30 minutes and 44 seconds
......@@ -776,11 +776,11 @@ void PDFGenerator::loadPages(QVector<Okular::Page *> &pagesVector, int rotation,
if (std::find_if(pageFormFields.begin(), pageFormFields.end(), compareSignatureByFullyQualifiedName) != pageFormFields.end()) {
delete s;
createSignature = false;
continue;
break;
}
}
// See if the signature is in page 0
if (std::find_if(page0FormFields.constBegin(), page0FormFields.constEnd(), compareSignatureByFullyQualifiedName) != page0FormFields.constEnd()) {
if (createSignature && std::find_if(page0FormFields.constBegin(), page0FormFields.constEnd(), compareSignatureByFullyQualifiedName) != page0FormFields.constEnd()) {
delete s;
createSignature = false;
}
......
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