aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFAcroFormDocumentHelper.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2021-02-18 16:20:30 +0100
committerJay Berkenbilt <ejb@ql.org>2021-02-18 16:25:07 +0100
commit0765872295e581ea6ae5a07e12916a552a1543ee (patch)
tree53e72ec4f1197e047aa41c87a212af8b8a7bdf30 /libqpdf/QPDFAcroFormDocumentHelper.cc
parent0a52e60ececc3ed7430dacaf4e433f04d91efbce (diff)
downloadqpdf-0765872295e581ea6ae5a07e12916a552a1543ee.tar.zst
Form field for non-widget just returns null
Diffstat (limited to 'libqpdf/QPDFAcroFormDocumentHelper.cc')
-rw-r--r--libqpdf/QPDFAcroFormDocumentHelper.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/libqpdf/QPDFAcroFormDocumentHelper.cc b/libqpdf/QPDFAcroFormDocumentHelper.cc
index ea12f656..0fcc81f6 100644
--- a/libqpdf/QPDFAcroFormDocumentHelper.cc
+++ b/libqpdf/QPDFAcroFormDocumentHelper.cc
@@ -70,16 +70,14 @@ QPDFFormFieldObjectHelper
QPDFAcroFormDocumentHelper::getFieldForAnnotation(QPDFAnnotationObjectHelper h)
{
QPDFObjectHandle oh = h.getObjectHandle();
+ QPDFFormFieldObjectHelper result(QPDFObjectHandle::newNull());
if (! (oh.isDictionary() &&
oh.getKey("/Subtype").isName() &&
(oh.getKey("/Subtype").getName() == "/Widget")))
{
- throw std::logic_error(
- "QPDFAnnotationObjectHelper::getFieldForAnnotation called for"
- " non-/Widget annotation");
+ return result;
}
analyze();
- QPDFFormFieldObjectHelper result(QPDFObjectHandle::newNull());
QPDFObjGen og(oh.getObjGen());
if (this->m->annotation_to_field.count(og))
{