Fixed a memory leak that occurred from canceling loading of audio with cache type set to RAM

Originally committed to SVN as r3073.
This commit is contained in:
harukalover 2009-06-17 02:04:01 +00:00
parent 1a85b179dc
commit e0ac4c7490
1 changed files with 4 additions and 1 deletions

View File

@ -101,7 +101,10 @@ RAMAudioProvider::RAMAudioProvider(AudioProvider *source) {
// Clean up progress
if (!canceled) progress->Destroy();
else throw wxString(_T("Audio loading cancelled by user"));
else {
Clear();
throw wxString(_T("Audio loading cancelled by user"));
}
}