Fixed wrong null check
Merge pull request #1365 from noctarius/wrong-nullcheck-xaresource

Fixed wrong null check