summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_interform.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/cpdfsdk_interform.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_interform.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp
index 27db1053c6..b60529df5d 100644
--- a/fpdfsdk/cpdfsdk_interform.cpp
+++ b/fpdfsdk/cpdfsdk_interform.cpp
@@ -327,12 +327,14 @@ void CPDFSDK_InterForm::UpdateField(CPDF_FormField* pFormField) {
CPDF_FormControl* pFormCtrl = pFormField->GetControl(i);
ASSERT(pFormCtrl);
- if (CPDFSDK_Widget* pWidget = GetWidget(pFormCtrl)) {
- UnderlyingPageType* pPage = pWidget->GetUnderlyingPage();
- m_pFormFillEnv->Invalidate(
- pPage, formfiller->GetViewBBox(
- m_pFormFillEnv->GetPageView(pPage, false), pWidget));
- }
+ CPDFSDK_Widget* pWidget = GetWidget(pFormCtrl);
+ if (!pWidget)
+ continue;
+
+ UnderlyingPageType* pPage = pWidget->GetUnderlyingPage();
+ FX_RECT rect = formfiller->GetViewBBox(
+ m_pFormFillEnv->GetPageView(pPage, false), pWidget);
+ m_pFormFillEnv->Invalidate(pPage, rect);
}
}