Index: fpdfsdk/src/fsdk_baseform.cpp |
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp |
index 7d0346c7975998904fb4dcccafe65c2c3a7f2690..b4aa822bb69e84683f1854b4628501f7fec66cf4 100644 |
--- a/fpdfsdk/src/fsdk_baseform.cpp |
+++ b/fpdfsdk/src/fsdk_baseform.cpp |
@@ -65,8 +65,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; |