summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_structtree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdf_structtree.cpp')
-rw-r--r--fpdfsdk/fpdf_structtree.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/fpdfsdk/fpdf_structtree.cpp b/fpdfsdk/fpdf_structtree.cpp
index 9bc1df66f8..26ded3d460 100644
--- a/fpdfsdk/fpdf_structtree.cpp
+++ b/fpdfsdk/fpdf_structtree.cpp
@@ -83,7 +83,5 @@ FPDF_StructElement_GetChildAtIndex(FPDF_STRUCTELEMENT struct_element,
if (!elem || index < 0 || index >= elem->CountKids())
return nullptr;
- CPDF_StructKid kid = elem->GetKid(index);
- return kid.m_Type == CPDF_StructKid::Element ? kid.m_Element.m_pElement
- : nullptr;
+ return elem->GetKidIfElement(index);
}