Avoid NPE for fringe cases

This change avoids an NPE that can occur in the rare case when thePlayer is not null, but theWorld is.
Merge pull request #83 from bspkrs/patch-1

Avoid NPE for fringe cases