Fix null pointer in IsTrusted()
Merge pull request #3804

ba51c7d Fix null pointer in IsTrusted() (Cozz Lovan)