summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/formfiller/cffl_checkbox.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/fpdfsdk/formfiller/cffl_checkbox.cpp b/fpdfsdk/formfiller/cffl_checkbox.cpp
index 1a3ccca547..9691f6dc6f 100644
--- a/fpdfsdk/formfiller/cffl_checkbox.cpp
+++ b/fpdfsdk/formfiller/cffl_checkbox.cpp
@@ -58,9 +58,12 @@ bool CFFL_CheckBox::OnChar(CPDFSDK_Annot* pAnnot,
}
CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
+
CPWL_CheckBox* pWnd = GetCheckBox(pPageView, true);
- if (pWnd)
- pWnd->SetCheck(!pWnd->IsChecked());
+ if (pWnd) {
+ CPDFSDK_Widget* pWidget = static_cast<CPDFSDK_Widget*>(pAnnot);
+ pWnd->SetCheck(!pWidget->IsChecked());
+ }
return CommitData(pPageView, nFlags);
}