Commit 9bf171a1 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 f1b29aca
Pipeline #34522 passed with stage
in 67 minutes and 44 seconds
......@@ -790,11 +790,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