diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-04-20 10:47:41 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-20 18:15:55 +0000 |
commit | 03f5bab415cda066855e2672154358056649c584 (patch) | |
tree | 587373e43063ca43db94f20fb1e6b15841233df2 /xfa/fxfa/parser/cxfa_simple_parser.cpp | |
parent | 9a2f69f26c136ef4b53285edc28f4e494997f630 (diff) | |
download | pdfium-03f5bab415cda066855e2672154358056649c584.tar.xz |
Do not insert null node if ParseAsXDPPacket_Config fails
Doing so trips an assert in the debug build but is harmless otherwise.
This appears to be wrong since the beginning of time.
Bug: 709793
Change-Id: I179f6944a3f7b2a89efa65a16078f6f58448ba4b
Reviewed-on: https://pdfium-review.googlesource.com/4390
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_simple_parser.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_simple_parser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xfa/fxfa/parser/cxfa_simple_parser.cpp b/xfa/fxfa/parser/cxfa_simple_parser.cpp index db15a80a44..4773fda22a 100644 --- a/xfa/fxfa/parser/cxfa_simple_parser.cpp +++ b/xfa/fxfa/parser/cxfa_simple_parser.cpp @@ -485,7 +485,8 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_XDP( pXMLConfigDOMRoot = pChildItem; pXFAConfigDOMRoot = ParseAsXDPPacket_Config(pXMLConfigDOMRoot, XFA_XDPPACKET_Config); - pXFARootNode->InsertChild(pXFAConfigDOMRoot, nullptr); + if (pXFAConfigDOMRoot) + pXFARootNode->InsertChild(pXFAConfigDOMRoot, nullptr); } CFX_XMLNode* pXMLDatasetsDOMRoot = nullptr; |