Merge pull request #1716 from raynichc/fixes/ScalingNPE
Fixed NPE when scaling when no components are selected
This commit is contained in:
		
						commit
						d2e3ebfa07
					
				@ -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.emptyList();
 | 
			
		||||
		return componentSelection;
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user