Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(451)

Unified Diff: fpdfsdk/formfiller/cffl_radiobutton.cpp

Issue 2368403002: Watch destruction of widgets around OnAAction() method (Closed)
Patch Set: blown merge Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/formfiller/cffl_interactiveformfiller.cpp ('k') | fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/formfiller/cffl_radiobutton.cpp
diff --git a/fpdfsdk/formfiller/cffl_radiobutton.cpp b/fpdfsdk/formfiller/cffl_radiobutton.cpp
index 17573fd625bc420715960423e9488ccfee36f9d5..6f30a9b97f135f6e0a14cbdb9a34a50a1c25c0ee 100644
--- a/fpdfsdk/formfiller/cffl_radiobutton.cpp
+++ b/fpdfsdk/formfiller/cffl_radiobutton.cpp
@@ -51,15 +51,13 @@ FX_BOOL CFFL_RadioButton::OnChar(CPDFSDK_Annot* pAnnot,
FX_BOOL bReset = FALSE;
FX_BOOL bExit = FALSE;
- m_pEnv->GetInteractiveFormFiller()->OnButtonUp(m_pWidget, pPageView,
+ CPDFSDK_Annot::ObservedPtr pObserved(m_pWidget);
+ m_pEnv->GetInteractiveFormFiller()->OnButtonUp(&pObserved, pPageView,
bReset, bExit, nFlags);
- if (bReset)
- return TRUE;
- if (bExit)
+ if (!pObserved || bReset || bExit)
return TRUE;
CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
-
if (CPWL_RadioButton* pWnd =
(CPWL_RadioButton*)GetPDFWindow(pPageView, TRUE))
pWnd->SetCheck(TRUE);
« no previous file with comments | « fpdfsdk/formfiller/cffl_interactiveformfiller.cpp ('k') | fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698