diff options
author | Matthias Sohn | 2017-03-20 13:08:46 +0000 |
---|---|---|
committer | Matthias Sohn | 2017-03-22 21:54:09 +0000 |
commit | b2af37dc2aefaf5f8cca901c1f166c8f8e202558 (patch) | |
tree | eb9bf6a62bcc277a098378c1c64d7a6a39f7840c | |
parent | aae1ea1638b39ff2b94193921fe82398e36f0ce8 (diff) | |
download | egit-b2af37dc2aefaf5f8cca901c1f166c8f8e202558.tar.gz egit-b2af37dc2aefaf5f8cca901c1f166c8f8e202558.tar.xz egit-b2af37dc2aefaf5f8cca901c1f166c8f8e202558.zip |
Fix NPE in StagingView.commit()
Bug: 513908
Change-Id: I278d6649d5cc8b3aba7f3da6f2d9a72e144ce306
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r-- | org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java index 96d902aaed..778a135001 100644 --- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java +++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java @@ -3861,20 +3861,21 @@ public class StagingView extends ViewPart if (pushUpstream) { pushMode = gerritMode ? PushMode.GERRIT : PushMode.UPSTREAM; } - final Job commitJob = new CommitJob(currentRepository, commitOperation) + Job commitJob = new CommitJob(currentRepository, commitOperation) .setOpenCommitEditor(openNewCommitsAction.isChecked()) .setPushUpstream(pushMode); // don't allow to do anything as long as commit is in progress enableAllWidgets(false); commitJob.addJobChangeListener(new JobChangeAdapter() { + @Override public void done(IJobChangeEvent event) { asyncExec(new Runnable() { @Override public void run() { enableAllWidgets(true); - if (commitJob.getResult().isOK()) { + if (event.getResult().isOK()) { commitMessageText.setText(EMPTY_STRING); } } |