diff options
author | Xavier Coulon | 2016-06-06 08:47:35 +0000 |
---|---|---|
committer | Jeff Johnston | 2016-06-06 19:55:58 +0000 |
commit | bb8007ef4cc49fd1f1e77d73b27cf2ecaee000bd (patch) | |
tree | 15673226a79917366197ba7dae03e2a0c93fb50f | |
parent | 6b9efec59fe4c0a175594eba94fd40d54cdb1e7b (diff) | |
download | org.eclipse.linuxtools-bb8007ef4cc49fd1f1e77d73b27cf2ecaee000bd.tar.gz org.eclipse.linuxtools-bb8007ef4cc49fd1f1e77d73b27cf2ecaee000bd.tar.xz org.eclipse.linuxtools-bb8007ef4cc49fd1f1e77d73b27cf2ecaee000bd.zip |
Bug 495517 - NullPointerException in ContainerDataVolumeDialog.setOkButtonEnabled
Testing against 'null' for the OK button. This could happen when the dialog
is not fully initialized (?)
Change-Id: I4bda14fecbc2fc2f7591a9a961a78e744d984aff
Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
Reviewed-on: https://git.eclipse.org/r/74626
Tested-by: Hudson CI
Reviewed-by: Jeff Johnston <jjohnstn@redhat.com>
(cherry picked from commit d020f7984934947fb7f7c4a84b5651af7c86d533)
Reviewed-on: https://git.eclipse.org/r/74708
-rw-r--r-- | containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerDataVolumeDialog.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerDataVolumeDialog.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerDataVolumeDialog.java index a72a41cc8a..256cbd850f 100644 --- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerDataVolumeDialog.java +++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/wizards/ContainerDataVolumeDialog.java @@ -465,7 +465,11 @@ public class ContainerDataVolumeDialog extends Dialog { } private void setOkButtonEnabled(final boolean enabled) { - getButton(IDialogConstants.OK_ID).setEnabled(enabled); + final Button okButton = getButton(IDialogConstants.OK_ID); + // skip if 'OK' button does not exist yet. + if (okButton != null) { + okButton.setEnabled(enabled); + } } } |