summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_widgethandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/cpdfsdk_widgethandler.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_widgethandler.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/fpdfsdk/cpdfsdk_widgethandler.cpp b/fpdfsdk/cpdfsdk_widgethandler.cpp
index a21063d55e..12ae17372a 100644
--- a/fpdfsdk/cpdfsdk_widgethandler.cpp
+++ b/fpdfsdk/cpdfsdk_widgethandler.cpp
@@ -31,11 +31,10 @@ CPDFSDK_WidgetHandler::CPDFSDK_WidgetHandler(
CPDFSDK_WidgetHandler::~CPDFSDK_WidgetHandler() {}
bool CPDFSDK_WidgetHandler::CanAnswer(CPDFSDK_Annot* pAnnot) {
- ASSERT(pAnnot->GetAnnotSubtype() == CPDF_Annot::Subtype::WIDGET);
- if (pAnnot->IsSignatureWidget())
+ CPDFSDK_Widget* pWidget = ToCPDFSDKWidget(pAnnot);
+ if (pWidget->IsSignatureWidget())
return false;
- CPDFSDK_Widget* pWidget = static_cast<CPDFSDK_Widget*>(pAnnot);
if (!pWidget->IsVisible())
return false;