Don't destroy the progress dialog when audio loading is cancelled as it's destroyed automatically

Originally committed to SVN as r4811.
This commit is contained in:
Thomas Goyne 2010-10-16 20:11:26 +00:00
parent 420f28adf8
commit 97089a7683
2 changed files with 2 additions and 2 deletions

View File

@ -93,12 +93,12 @@ HDAudioProvider::HDAudioProvider(AudioProvider *src) {
file_cache.Seek(0); file_cache.Seek(0);
// Finish // Finish
progress->Destroy();
if (canceled) { if (canceled) {
file_cache.Close(); file_cache.Close();
delete[] data; delete[] data;
throw agi::UserCancelException("Audio loading cancelled by user"); throw agi::UserCancelException("Audio loading cancelled by user");
} }
progress->Destroy();
} }
/// @brief Destructor /// @brief Destructor

View File

@ -99,11 +99,11 @@ RAMAudioProvider::RAMAudioProvider(AudioProvider *src) {
} }
// Clean up progress // Clean up progress
progress->Destroy();
if (canceled) { if (canceled) {
Clear(); Clear();
throw agi::UserCancelException("Audio loading cancelled by user"); throw agi::UserCancelException("Audio loading cancelled by user");
} }
progress->Destroy();
} }
/// @brief Destructor /// @brief Destructor