Fixed potential null dereference
Fixes CID 70466
Merge pull request #1310 from mc-server/ChestFix

Fixed potential null dereference