diff --git a/swing/src/net/sf/openrocket/gui/scalefigure/RocketPanel.java b/swing/src/net/sf/openrocket/gui/scalefigure/RocketPanel.java index ada4418b0..0aa277a69 100644 --- a/swing/src/net/sf/openrocket/gui/scalefigure/RocketPanel.java +++ b/swing/src/net/sf/openrocket/gui/scalefigure/RocketPanel.java @@ -596,6 +596,8 @@ public class RocketPanel extends JPanel implements TreeSelectionListener, Change List selectedComponents = Arrays.stream(selectionModel.getSelectionPaths()) .map(c -> (RocketComponent) c.getLastPathComponent()).collect(Collectors.toList()); + if (clicked == null || clicked.length == 0) return; + // If the shift-button is held, add a newly clicked component to the selection path if ((event.isShiftDown() || event.isMetaDown()) && event.getClickCount() == 1) { List paths = new ArrayList<>(Arrays.asList(selectionModel.getSelectionPaths()));