Index: fpdfsdk/src/fsdk_baseform.cpp |
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp |
index 3dc48dab53f26dfcd8972dd0c55ae07c91b9422b..d7374a6f18db5b38b2bfdeaab95af2cecd336029 100644 |
--- a/fpdfsdk/src/fsdk_baseform.cpp |
+++ b/fpdfsdk/src/fsdk_baseform.cpp |
@@ -538,8 +538,7 @@ FX_BOOL CPDFSDK_Widget::IsWidgetAppearanceValid( |
return psub->GetType() == PDFOBJ_STREAM; |
case FIELDTYPE_CHECKBOX: |
case FIELDTYPE_RADIOBUTTON: |
- if (psub->GetType() == PDFOBJ_DICTIONARY) { |
- CPDF_Dictionary* pSubDict = (CPDF_Dictionary*)psub; |
+ if (CPDF_Dictionary* pSubDict = psub->AsDictionary()) { |
return pSubDict->GetStream(GetAppState()) != NULL; |
} |
return FALSE; |