Fixed memory leak on exception throw in csri.

Originally committed to SVN as r1049.
This commit is contained in:
Rodrigo Braz Monteiro 2007-04-09 16:09:45 +00:00
parent 34c9492f97
commit 7e398170d9
1 changed files with 4 additions and 1 deletions

View File

@ -141,7 +141,10 @@ void CSRISubtitlesProvider::LoadSubtitles(AssFile *subs) {
// Matching renderer not found, fallback to default
if (!renderer) {
renderer = csri_renderer_default();
if (!renderer) throw _T("No CSRI renderer available. Try installing one or switch to another subtitle provider.");
if (!renderer) {
delete subs;
throw _T("No CSRI renderer available. Try installing one or switch to another subtitle provider.");
}
}
// Open from memory