diff options
Diffstat (limited to 'xfa/fxfa/parser/cxfa_imagedata.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_imagedata.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xfa/fxfa/parser/cxfa_imagedata.cpp b/xfa/fxfa/parser/cxfa_imagedata.cpp index 2ad891d7ec..7888c34205 100644 --- a/xfa/fxfa/parser/cxfa_imagedata.cpp +++ b/xfa/fxfa/parser/cxfa_imagedata.cpp @@ -35,7 +35,13 @@ bool CXFA_ImageData::GetHref(WideString& wsHref) { wsHref = *ret; return true; } - return m_pNode->JSNode()->GetAttribute(XFA_Attribute::Href, wsHref, true); + pdfium::Optional<WideString> ret = + m_pNode->JSNode()->TryAttribute(XFA_Attribute::Href, true); + if (!ret) + return false; + + wsHref = *ret; + return true; } XFA_ATTRIBUTEENUM CXFA_ImageData::GetTransferEncoding() { |