diff options
Diffstat (limited to 'src/Volume/EncryptionThreadPool.cpp')
-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(); |