From ea4fa2f140a4d8109a062425930b516b81465330 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Fri, 10 Jul 2015 18:22:40 +0200 Subject: [client] null check on selectedElement in ImageListWindow to prevent those nasty NPEs --- .../src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dozentenmodul/src/main/java') diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java index 4075adf0..3d3221d4 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java @@ -30,7 +30,7 @@ public class ImageListWindow extends ImageListWindowLayout { public void selectionChanged(SelectionChangedEvent event) { IStructuredSelection selection = (IStructuredSelection) tableViewer.getSelection(); ImageSummaryRead selectedElement = (ImageSummaryRead) selection.getFirstElement(); - + if (selectedElement == null) return; String imageName = selectedElement.getImageName(); if (imageName == null) { imageSelectedNameLabel.setText("Unknown"); -- cgit v1.2.3-55-g7522