VolumeVerifier: Fix potential crash when cancelling

The async operations may contain references to class members, so
any running async operations must end before destroying the class.
This commit is contained in:
JosJuice 2021-03-07 13:52:54 +01:00
parent de30559862
commit 96ebf01ea8
1 changed files with 4 additions and 1 deletions

View File

@ -378,7 +378,10 @@ VolumeVerifier::VolumeVerifier(const Volume& volume, bool redump_verification,
m_redump_verification = false;
}
VolumeVerifier::~VolumeVerifier() = default;
VolumeVerifier::~VolumeVerifier()
{
WaitForAsyncOperations();
}
void VolumeVerifier::Start()
{