Browse Source

fixed NPE if winDriveLetter is null (on Linux/Mac)

Sebastian Stenzel 4 years ago
parent
commit
d3fb90bf6d

+ 3 - 1
main/ui/src/main/java/org/cryptomator/ui/vaultoptions/MountOptionsController.java

@@ -162,7 +162,9 @@ public class MountOptionsController implements FxController {
 
 		@Override
 		public String toString(String driveLetter) {
-			if (occupiedDriveLetters.contains(driveLetter)) {
+			if (Strings.isNullOrEmpty(driveLetter)) {
+				return "";
+			} else if (occupiedDriveLetters.contains(driveLetter)) {
 				return driveLetter + ": (" + resourceBundle.getString("vaultOptions.mount.winDriveLetterOccupied") + ")";
 			} else {
 				return driveLetter + ":";