From 48db617862e6ead8d6018b441c42f73def4b5104 Mon Sep 17 00:00:00 2001 From: Alexey Katsman Date: Fri, 13 Feb 2026 10:47:59 +0100 Subject: [PATCH] PY-87617 Fix WSL browse dialog when text field is null There was a problem when browse dialog was invoked with null value in the text field. This is possible when the field is a combo box, but there are no values present. The fix is to fallback to default directory (user home and then root) in case of null in the text field. GitOrigin-RevId: ebd4f834ab696017ddb6fcaf02e0b519e3decc33 --- .../src/com/intellij/execution/wsl/target/WslTargetType.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/execution-impl/src/com/intellij/execution/wsl/target/WslTargetType.kt b/platform/execution-impl/src/com/intellij/execution/wsl/target/WslTargetType.kt index e4779ad6ee38..582f221d28b8 100644 --- a/platform/execution-impl/src/com/intellij/execution/wsl/target/WslTargetType.kt +++ b/platform/execution-impl/src/com/intellij/execution/wsl/target/WslTargetType.kt @@ -79,7 +79,7 @@ class WslTargetType : TargetEnvironmentType(T configuration.distribution?.let { val textAccessor = object : TextAccessor { override fun setText(text: String) = textComponentAccessor.setText(component, text) - override fun getText() = textComponentAccessor.getText(component) + override fun getText(): @NlsSafe String = textComponentAccessor.getText(component) ?: it.userHome ?: "/" } browseWslPath(textAccessor, it,