Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 481c271
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/C++/Core/Ap4Descriptor.h
Expand Up @@ -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:
Expand Down

0 comments on commit 481c271

Please sign in to comment.