summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_baseform.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/fsdk_baseform.cpp')
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index b4aa822bb6..7d0346c797 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -65,7 +65,8 @@ FX_BOOL CPDFSDK_Widget::IsWidgetAppearanceValid(
return psub->GetType() == PDFOBJ_STREAM;
case FIELDTYPE_CHECKBOX:
case FIELDTYPE_RADIOBUTTON:
- if (CPDF_Dictionary* pSubDict = psub->AsDictionary()) {
+ if (psub->GetType() == PDFOBJ_DICTIONARY) {
+ CPDF_Dictionary* pSubDict = (CPDF_Dictionary*)psub;
return pSubDict->GetStream(GetAppState()) != NULL;
}
return FALSE;