Commit 5cdb78fd authored by Albert Astals Cid's avatar Albert Astals Cid

Fix crash in PDFDoc::getSignatureFields when there's no Forms at all

parent 0f01638f
......@@ -613,10 +613,12 @@ static void addSignatureFieldsToVector(FormField *ff, std::vector<FormFieldSigna
std::vector<FormFieldSignature*> PDFDoc::getSignatureFields()
{
// const int num_pages = getNumPages();
std::vector<FormFieldSignature*> res;
const Form *f = catalog->getForm();
if (!f)
return res;
const int nRootFields = f->getNumFields();
for (int i = 0; i < nRootFields; ++i) {
FormField *ff = f->getRootField(i);
......
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