fixed a NullReferenceException on TilesetBuilder export

closes #4506
Merge pull request #4714 from Mailaender/tile-export-nre

Fixed a NullReferenceException on TilesetBuilder export