VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Volume/EncryptionThreadPool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Volume/EncryptionThreadPool.cpp')
-rw-r--r--src/Volume/EncryptionThreadPool.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Volume/EncryptionThreadPool.cpp b/src/Volume/EncryptionThreadPool.cpp
index 4219c7d7..04c32c7d 100644
--- a/src/Volume/EncryptionThreadPool.cpp
+++ b/src/Volume/EncryptionThreadPool.cpp
@@ -125,9 +125,7 @@ namespace VeraCrypt
firstFragmentWorkItem->ItemCompletedEvent.Wait();
- auto_ptr <Exception> itemException;
- if (firstFragmentWorkItem->ItemException.get())
- itemException = firstFragmentWorkItem->ItemException;
+ unique_ptr <Exception> itemException = std::move(firstFragmentWorkItem->ItemException);
firstFragmentWorkItem->State.Set (WorkItem::State::Free);
WorkItemCompletedEvent.Signal();