From fbecb9a5150d2c5391581933c8089e7249292171 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Wed, 18 Apr 2018 21:20:32 +0000 Subject: Do not show validation errors if PDF not yet loaded This prevents display of confusing popups during the loading/initialization of the XFA document. The spec explicitly states that validation should be run at this point, but other viewers like Acrobat do not fire this spurious pop ups. BUG=pdfium:975 Change-Id: Ic00d8c767ae94f95c7455a58b77e0b7283e3307c Reviewed-on: https://pdfium-review.googlesource.com/30930 Commit-Queue: Lei Zhang Commit-Queue: Ryan Harrison Reviewed-by: Lei Zhang --- fpdfsdk/fpdfxfa/cpdfxfa_context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fpdfsdk/fpdfxfa/cpdfxfa_context.cpp') diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp index 949d886e01..c85c1bd27e 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp @@ -225,7 +225,7 @@ int32_t CPDFXFA_Context::MsgBox(const WideString& wsMessage, const WideString& wsTitle, uint32_t dwIconType, uint32_t dwButtonType) { - if (!m_pFormFillEnv) + if (!m_pFormFillEnv || m_nLoadStatus != FXFA_LOADSTATUS_LOADED) return -1; uint32_t iconType = 0; -- cgit v1.2.3