Skip to content
Permalink
Browse files
Merge pull request #606 from dimitry-ishenko/issue-604
Check for null descriptor
  • Loading branch information
barbibulle committed Aug 4, 2021
2 parents b0eb46e + 71bac93 commit 481c27193528ed8087c6b3b116048845d24a56e5
Showing with 1 addition and 1 deletion.
  1. +1 −1 Source/C++/Core/Ap4Descriptor.h
@@ -89,7 +89,7 @@ class AP4_DescriptorFinder : public AP4_List<AP4_Descriptor>::Item::Finder
public:
AP4_DescriptorFinder(AP4_UI08 tag) : m_Tag(tag) {}
AP4_Result Test(AP4_Descriptor* descriptor) const {
return descriptor->GetTag() == m_Tag ? AP4_SUCCESS : AP4_FAILURE;
return (descriptor && descriptor->GetTag() == m_Tag) ? AP4_SUCCESS : AP4_FAILURE;
}

private:

0 comments on commit 481c271

Please sign in to comment.