From 96ebf01ea86a0375beedc7b8a74e2f314653278b Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 7 Mar 2021 13:52:54 +0100 Subject: [PATCH] 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. --- Source/Core/DiscIO/VolumeVerifier.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp index 21ac8f5d39..15cce81126 100644 --- a/Source/Core/DiscIO/VolumeVerifier.cpp +++ b/Source/Core/DiscIO/VolumeVerifier.cpp @@ -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() {