Skip to content

Commit

Permalink
Fix #154 NullPointerException while "Track Release"
Browse files Browse the repository at this point in the history
  • Loading branch information
OpherV committed Sep 21, 2018
1 parent 0963dcf commit 816f082
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/gitflow/ui/GitflowBranchChooseDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.ui.ValidationInfo;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
Expand Down Expand Up @@ -29,6 +30,16 @@ public GitflowBranchChooseDialog(Project project, List<String> branchNames) {
init();
}

@Nullable
@Override
protected ValidationInfo doValidate() {
if (branchList.getSelectedValue() == null){
return new ValidationInfo("No branch selected!");
} else {
return null;
}
}

@Nullable
@Override
protected JComponent createCenterPanel() {
Expand Down

0 comments on commit 816f082

Please sign in to comment.