summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2015-07-10 18:22:40 +0200
committerJonathan Bauer2015-07-10 18:22:40 +0200
commitea4fa2f140a4d8109a062425930b516b81465330 (patch)
treeff40ce711da2ac52c4ee56cc038a7505753a4c1d
parent[client] forgot to remove debug stuff once more... (diff)
downloadtutor-module-ea4fa2f140a4d8109a062425930b516b81465330.tar.gz
tutor-module-ea4fa2f140a4d8109a062425930b516b81465330.tar.xz
tutor-module-ea4fa2f140a4d8109a062425930b516b81465330.zip
[client] null check on selectedElement in ImageListWindow to prevent those nasty NPEs
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java2
1 files changed, 1 insertions, 1 deletions
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");