Fixed NPE when scaling if no components are selected
This commit is contained in:
parent
0b7d9fe0ef
commit
ad46bb9b6e
@ -2,6 +2,7 @@ package net.sf.openrocket.gui.main;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
@ -90,7 +91,7 @@ public class DocumentSelectionModel {
|
||||
* @return the currently selected rocket components, or <code>null</code>.
|
||||
*/
|
||||
public List<RocketComponent> getSelectedComponents() {
|
||||
if (componentSelection.size() == 0) return null;
|
||||
if (componentSelection.size() == 0) return Collections.EMPTY_LIST;
|
||||
return componentSelection;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user