| Index: xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp
|
| diff --git a/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp b/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp
|
| index 262a0be7171040c768bb8b2f39c22bcea4124846..f83b7720035ddda25e136e702562bcd09d55eae6 100644
|
| --- a/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp
|
| +++ b/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp
|
| @@ -603,10 +603,9 @@ int32_t CXFA_LayoutPageMgr::GetPageCount() const {
|
| return m_PageArray.GetSize();
|
| }
|
| IXFA_LayoutPage* CXFA_LayoutPageMgr::GetPage(int32_t index) const {
|
| - if (m_PageArray.GetSize() > index) {
|
| - return m_PageArray[index];
|
| - }
|
| - return NULL;
|
| + if (index < 0 || index >= m_PageArray.GetSize())
|
| + return nullptr;
|
| + return m_PageArray[index];
|
| }
|
| int32_t CXFA_LayoutPageMgr::GetPageIndex(const IXFA_LayoutPage* pPage) const {
|
| // FIXME: Find() method should take const.
|
|
|