VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Main/UserInterface.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Main/UserInterface.cpp b/src/Main/UserInterface.cpp
index b9fc5f9f..dfeb32fd 100644
--- a/src/Main/UserInterface.cpp
+++ b/src/Main/UserInterface.cpp
@@ -596,10 +596,13 @@ namespace VeraCrypt
HostDeviceList devices;
foreach (shared_ptr <HostDevice> device, Core->GetHostDevices (true))
{
- devices.push_back (device);
-
- foreach (shared_ptr <HostDevice> partition, device->Partitions)
- devices.push_back (partition);
+ if (device->Partitions.empty())
+ devices.push_back (device);
+ else
+ {
+ foreach (shared_ptr <HostDevice> partition, device->Partitions)
+ devices.push_back (partition);
+ }
}
set <wstring> mountedVolumes;