From 4287dc75e4550cb190972f1a40c1a7900f2d3af5 Mon Sep 17 00:00:00 2001 From: Mikhail Golubev Date: Wed, 12 Apr 2017 17:33:31 +0300 Subject: [PATCH] PY-23553 Don't set up validators on the remote path field until all panels are created otherwise we might end up running checkValid() on not yet created components, hence these NPEs. --- .../newProject/steps/ProjectSpecificSettingsStep.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/python-community-configure/src/com/jetbrains/python/newProject/steps/ProjectSpecificSettingsStep.java b/python/python-community-configure/src/com/jetbrains/python/newProject/steps/ProjectSpecificSettingsStep.java index 594ba2c8295c..9a7f106dc5ec 100644 --- a/python/python-community-configure/src/com/jetbrains/python/newProject/steps/ProjectSpecificSettingsStep.java +++ b/python/python-community-configure/src/com/jetbrains/python/newProject/steps/ProjectSpecificSettingsStep.java @@ -177,6 +177,11 @@ public class ProjectSpecificSettingsStep extends ProjectSettingsStepBase impleme }, "Refreshing List of Packages, Please Wait", false, null); } }); + + if (myRemotePathField != null) { + myRemotePathField.addTextChangeListener(this::checkValid); + } + UiNotifyConnector.doWhenFirstShown(mySdkCombo, this::checkValid); } } @@ -348,7 +353,6 @@ public class ProjectSpecificSettingsStep extends ProjectSettingsStepBase impleme mySdkCombo.addChangedListener(e -> configureMappingField(remoteInterpreterManager)); panelToAddField.add(myRemotePathField.getMainPanel()); - myRemotePathField.addTextChangeListener(() -> checkValid()); configureMappingField(remoteInterpreterManager); }