Index: fpdfsdk/fpdf_structtree.cpp |
diff --git a/fpdfsdk/fpdf_structtree.cpp b/fpdfsdk/fpdf_structtree.cpp |
index 9bc1df66f8e07738a18de5b0612a424ce51f71ab..26ded3d46077bdc008ea77e5e166673b8b6ce5c9 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); |
} |