CRASH: fix tilegen editor crash when refreshing