Make CFX_FontMgr member variables private. (try 2)
[pdfium.git] / fpdfsdk / src / fsdk_baseform.cpp
index 7d0346c..b4aa822 100644 (file)
@@ -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;