From: Reino Ruusu Date: Wed, 3 Jun 2020 08:42:13 +0000 (+0300) Subject: Add null check to ComponentSelectionDialog X-Git-Tag: v1.43.0~7 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F67%2F4267%2F1;p=simantics%2F3d.git Add null check to ComponentSelectionDialog gitlab #132 Change-Id: If300f070b304f5487de172454db3389f6cd3da94 --- 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; }