added undefine check
Merge pull request #82 from nsue/fix-onRemovePlayer-undefine-check

added undefine check