Avoid NPE on non-initialized form

GitOrigin-RevId: e545e2ae5cc324447f9b864d74b4d618c375aacb
This commit is contained in:
Alexander Zolotov
2020-02-20 12:20:16 +03:00
committed by intellij-monorepo-bot
parent 58fb465684
commit e558acfc91

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.execution.impl;
import com.intellij.execution.ExecutionBundle;
@@ -180,7 +180,10 @@ public final class SingleConfigurationConfigurable<Config extends RunConfigurati
return getEditor();
}
if (RUN_ON_TARGET_NAME_KEY.is(dataId)) {
return ((RunOnTargetComboBox)myComponent.myRunOnComboBox).getSelectedTargetName();
RunOnTargetComboBox runOnComboBox = (RunOnTargetComboBox) myComponent.myRunOnComboBox;
if (runOnComboBox != null) {
return runOnComboBox.getSelectedTargetName();
}
}
return null;
});