diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/ui/HgPushDialog.java b/plugins/hg4idea/src/org/zmlx/hg4idea/ui/HgPushDialog.java index 52bb68be9de9..158d18c06535 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/ui/HgPushDialog.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/ui/HgPushDialog.java @@ -132,8 +132,10 @@ public class HgPushDialog extends DialogWrapper { ApplicationManager.getApplication().invokeLater(new Runnable() { @Override public void run() { - updateRepositoryUrlText(HgUtil.removePasswordIfNeeded(defaultPath)); - myCurrentRepositoryUrl = defaultPath; + if (defaultPath != null) { + updateRepositoryUrlText(HgUtil.removePasswordIfNeeded(defaultPath)); + myCurrentRepositoryUrl = defaultPath; + } updateBranchComboBox(branches); } }, ModalityState.stateForComponent(getRootPane()));