From 377d27d72fa3434ea8419e2e625819b72d5a215b Mon Sep 17 00:00:00 2001 From: Reino Ruusu Date: Wed, 3 Jun 2020 11:42:13 +0300 Subject: [PATCH] Add null check to ComponentSelectionDialog gitlab #132 Change-Id: If300f070b304f5487de172454db3389f6cd3da94 --- .../simantics/plant3d/dialog/ComponentSelectionDialog.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/dialog/ComponentSelectionDialog.java b/org.simantics.plant3d/src/org/simantics/plant3d/dialog/ComponentSelectionDialog.java index cfd8c861..2321c1f9 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/dialog/ComponentSelectionDialog.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/dialog/ComponentSelectionDialog.java @@ -447,8 +447,10 @@ public class ComponentSelectionDialog extends Dialog implements ISelectionChange GridDataFactory.fillDefaults().span(2, 1).align(SWT.END, SWT.END).grab(true, false).applyTo(validationLabel); if (!allowed.contains(PositionType.NEXT) && !allowed.contains(PositionType.PREVIOUS)) { - turnViewer.getList().setEnabled(false); - endViewer.getList().setEnabled(false); + if (turnViewer != null) + turnViewer.getList().setEnabled(false); + if (endViewer != null) + endViewer.getList().setEnabled(false); inlineSplit = true; } -- 2.47.1