Assert CPDFSDK_Annot::GetPageView() never returns nullptr.

Then remove some dead code as a result.

Change-Id: I544c711b569a0f4a6ec59e69101e147c9cb3fac2
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/66376
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.cpp b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
index 243528e..73a065d 100644
--- a/fpdfsdk/cpdfsdk_formfillenvironment.cpp
+++ b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
@@ -74,12 +74,12 @@
   if (!widget)
     return;
 
-  CPDFSDK_PageView* pPageView = widget->GetPageView();
   IPDF_Page* pPage = widget->GetPage();
-  if (!pPage || !pPageView)
+  if (!pPage)
     return;
 
-  CFX_Matrix device2page = pPageView->GetCurrentMatrix().GetInverse();
+  CFX_Matrix device2page =
+      widget->GetPageView()->GetCurrentMatrix().GetInverse();
   CFX_PointF left_top = device2page.Transform(CFX_PointF(rect.left, rect.top));
   CFX_PointF right_bottom =
       device2page.Transform(CFX_PointF(rect.right, rect.bottom));
@@ -684,8 +684,7 @@
   if (!pAnnot->HasObservable())
     return false;
 
-  CPDFSDK_PageView* pPageView = (*pAnnot)->GetPageView();
-  if (!pPageView || !pPageView->IsValid())
+  if (!(*pAnnot)->GetPageView()->IsValid())
     return false;
 
   CPDFSDK_AnnotHandlerMgr* pAnnotHandler = GetAnnotHandlerMgr();
@@ -764,7 +763,7 @@
   }
 
   CPDFSDK_PageView* pPageView = (*pAnnot)->GetPageView();
-  if (!pPageView || !pPageView->IsValid())
+  if (!pPageView->IsValid())
     return;
 
   CPDF_Page* cpdf_page = (*pAnnot)->GetPDFPage();
@@ -779,4 +778,4 @@
       FPDFAnnotationFromCPDFAnnotContext(focused_annot.get());
 
   m_pInfo->FFI_OnFocusChange(m_pInfo, fpdf_annot, pPageView->GetPageIndex());
-}
\ No newline at end of file
+}