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);
|
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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue