diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2020-06-26 01:18:40 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2020-06-26 01:22:18 +0200 |
commit | 5fb407cffebb8ec0cc50cb3e96e1bebf79ad1bc0 (patch) | |
tree | f621b8428b6390cb7f01d64fe72a7bd6ce400d9a /src/Volume | |
parent | 4137c5e15bf3d784f3e6a84a1268f592910f9a67 (diff) | |
download | VeraCrypt-5fb407cffebb8ec0cc50cb3e96e1bebf79ad1bc0.tar.gz VeraCrypt-5fb407cffebb8ec0cc50cb3e96e1bebf79ad1bc0.zip |
Linux/MacOSX: use standard std::shared_ptr instead of our custom implementation which is kept for compatibility with older compilers. We also introduce compatibility code for old compilers that don't define std::unique_ptr
Diffstat (limited to 'src/Volume')
-rw-r--r-- | src/Volume/EncryptionThreadPool.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Volume/EncryptionThreadPool.cpp b/src/Volume/EncryptionThreadPool.cpp index 04c32c7d..7c86bf49 100644 --- a/src/Volume/EncryptionThreadPool.cpp +++ b/src/Volume/EncryptionThreadPool.cpp @@ -125,7 +125,9 @@ namespace VeraCrypt firstFragmentWorkItem->ItemCompletedEvent.Wait(); - unique_ptr <Exception> itemException = std::move(firstFragmentWorkItem->ItemException); + unique_ptr <Exception> itemException; + if (firstFragmentWorkItem->ItemException.get()) + itemException = move_ptr(firstFragmentWorkItem->ItemException); firstFragmentWorkItem->State.Set (WorkItem::State::Free); WorkItemCompletedEvent.Signal(); |