diff options
author | Lei Zhang <thestig@chromium.org> | 2017-06-13 14:04:02 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-06-15 18:28:02 +0000 |
commit | 6a3fc45b9e238d9b7b601cb13be664391d393b42 (patch) | |
tree | 69182b8517f5ecea3ebe24f46fa72b43d70a7f26 /fpdfsdk/formfiller/cffl_interactiveformfiller.cpp | |
parent | 65a55343e623924c9c3bbbd953097cf7fd0f5fc6 (diff) | |
download | pdfium-6a3fc45b9e238d9b7b601cb13be664391d393b42.tar.xz |
Add more checks for destroyed annotations in CFFL_FormFiller.
CFFL_FormFiller::CommitData() should check more rigorously and so should
its callers.
BUG=chromium:732051
Change-Id: If0cee8fb61de10dc7678dad89c330d75bee55aa4
Reviewed-on: https://pdfium-review.googlesource.com/6530
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/formfiller/cffl_interactiveformfiller.cpp')
-rw-r--r-- | fpdfsdk/formfiller/cffl_interactiveformfiller.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp index f36afa65d5..935e3fffb6 100644 --- a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp +++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp @@ -425,6 +425,9 @@ bool CFFL_InteractiveFormFiller::OnKillFocus(CPDFSDK_Annot::ObservedPtr* pAnnot, ASSERT((*pAnnot)->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot->Get(), false)) { pFormFiller->KillFocusForAnnot(pAnnot->Get(), nFlag); + if (!(*pAnnot)) + return false; + if (!m_bNotifying) { CPDFSDK_Widget* pWidget = static_cast<CPDFSDK_Widget*>(pAnnot->Get()); if (pWidget->GetAAction(CPDF_AAction::LoseFocus).GetDict()) { |