]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
Add null check to ComponentSelectionDialog 67/4267/1
authorReino Ruusu <reino.ruusu@semantum.fi>
Wed, 3 Jun 2020 08:42:13 +0000 (11:42 +0300)
committerReino Ruusu <reino.ruusu@semantum.fi>
Wed, 3 Jun 2020 08:42:13 +0000 (11:42 +0300)
gitlab #132

Change-Id: If300f070b304f5487de172454db3389f6cd3da94

org.simantics.plant3d/src/org/simantics/plant3d/dialog/ComponentSelectionDialog.java

index cfd8c861dbc7d578f9f7e7ee39eaad13a9014e63..2321c1f9941fbd89f2251c6b64b9f89a2ec8efea 100644 (file)
@@ -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;
                }