if (surface_exists(bg_surface)) surface_free(bg_surface); if (sprite_exists(custom_sprite)) sprite_delete(custom_sprite);