Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Coulon2016-01-06 11:11:22 +0000
committerJeff Johnston2016-01-12 22:46:50 +0000
commitdf0cce0b61abe448767e73d8121e5094f8a5eb2a (patch)
tree234f920c46c17ed16efa27fef133523354e2e9e2
parent61d1c4672203a9be17221b3dff79c68665a15a66 (diff)
downloadorg.eclipse.linuxtools-df0cce0b61abe448767e73d8121e5094f8a5eb2a.tar.gz
org.eclipse.linuxtools-df0cce0b61abe448767e73d8121e5094f8a5eb2a.tar.xz
org.eclipse.linuxtools-df0cce0b61abe448767e73d8121e5094f8a5eb2a.zip
Bug 482256 - NullPointerException in ImageInspectPropertySection$1.run
Preventing the NPE by checking that the retrieved ImageInfo is not null. Change-Id: I02f3e7cf12bb7da75eb37d971c8b99ae6052b428 Signed-off-by: Xavier Coulon <xcoulon@redhat.com> Reviewed-on: https://git.eclipse.org/r/63622 Tested-by: Hudson CI Reviewed-by: Jeff Johnston <jjohnstn@redhat.com> (cherry picked from commit 5604c5ab8b315eb7037741e241a9c89330794e73) Reviewed-on: https://git.eclipse.org/r/64173
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/ImageInspectPropertySection.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/ImageInspectPropertySection.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/ImageInspectPropertySection.java
index 874d2e802c..b1fe0f16f6 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/ImageInspectPropertySection.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/ImageInspectPropertySection.java
@@ -88,7 +88,11 @@ public class ImageInspectPropertySection extends BasePropertySection {
protected IStatus run(final IProgressMonitor monitor) {
monitor.beginTask(
DVMessages.getString(PropertiesLoadingImageInfo), 1);
- result.add(connection.getImageInfo(image.id()));
+ final IDockerImageInfo imageInfo = connection
+ .getImageInfo(image.id());
+ if (imageInfo != null) {
+ result.add(imageInfo);
+ }
monitor.done();
return Status.OK_STATUS;
}

Back to the top