Fixes segmentation fault caused by destroying variables at the end of line 220 of tilesetmanager.cpp which resulted in pointers pointing to garbage.