mirror of https://github.com/odrling/Aegisub
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:
parent
420f28adf8
commit
97089a7683
|
@ -93,12 +93,12 @@ HDAudioProvider::HDAudioProvider(AudioProvider *src) {
|
|||
file_cache.Seek(0);
|
||||
|
||||
// Finish
|
||||
progress->Destroy();
|
||||
if (canceled) {
|
||||
file_cache.Close();
|
||||
delete[] data;
|
||||
throw agi::UserCancelException("Audio loading cancelled by user");
|
||||
}
|
||||
progress->Destroy();
|
||||
}
|
||||
|
||||
/// @brief Destructor
|
||||
|
|
|
@ -99,11 +99,11 @@ RAMAudioProvider::RAMAudioProvider(AudioProvider *src) {
|
|||
}
|
||||
|
||||
// Clean up progress
|
||||
progress->Destroy();
|
||||
if (canceled) {
|
||||
Clear();
|
||||
throw agi::UserCancelException("Audio loading cancelled by user");
|
||||
}
|
||||
progress->Destroy();
|
||||
}
|
||||
|
||||
/// @brief Destructor
|
||||
|
|
Loading…
Reference in New Issue