mrkite / TerraFirma

Mapping for Terraria
http://seancode.com/terrafirma
BSD 2-Clause "Simplified" License
278 stars 61 forks source link

TerraFirma 3.1 crashes on old maps #99

Closed galtgendo closed 4 years ago

galtgendo commented 4 years ago

If textures are on and the map is old enough to not have guid field in the header, terrafirma crashes in World::loadPlayer() upon accessing returned null header. A check for null around the part that uses the returned value and changing the next condition to '!g || !dir.exists(path)' fixes the crash.