fixed TMXLayer.java

This is a copy of TMXLayer.java with a bug fix for a
NullPointerException.  Replace the TMXLayer in the TMX extension with
this for the game to work.