summaryrefslogtreecommitdiff
path: root/xfa/fde/tto/fde_textout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fde/tto/fde_textout.cpp')
-rw-r--r--xfa/fde/tto/fde_textout.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/xfa/fde/tto/fde_textout.cpp b/xfa/fde/tto/fde_textout.cpp
index c9f5ec84ef..f816176841 100644
--- a/xfa/fde/tto/fde_textout.cpp
+++ b/xfa/fde/tto/fde_textout.cpp
@@ -775,10 +775,7 @@ int32_t CFDE_TTOLine::GetSize() const {
}
FDE_TTOPIECE* CFDE_TTOLine::GetPtrAt(int32_t index) {
- if (index < 0 || index >= pdfium::CollectionSize<int32_t>(m_pieces))
- return nullptr;
-
- return &m_pieces[index];
+ return pdfium::IndexInBounds(m_pieces, index) ? &m_pieces[index] : nullptr;
}
void CFDE_TTOLine::RemoveLast(int32_t icount) {