Fixed possible crash when workign with a new ASS format file
More fixes for resource leaks