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 0d54078d93
commit d83b19e57b

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"));
}
}