handle case where no ships in list
This commit is contained in:
		
							parent
							
								
									ef8b80bfa8
								
							
						
					
					
						commit
						da85ce0baf
					
				@ -502,7 +502,7 @@ impl ShipList {
 | 
			
		||||
    pub fn new(ships: Vec<ShipListEntry>) -> ShipList {
 | 
			
		||||
        ShipList {
 | 
			
		||||
            baseship: ShipListEntry {
 | 
			
		||||
                menu: ships[0].menu,
 | 
			
		||||
                menu: ships.get(0).map(|s| s.menu).unwrap_or(0),
 | 
			
		||||
                item: 0,
 | 
			
		||||
                flags: 0,
 | 
			
		||||
                name: utf8_to_utf16_array!("Ship", 0x11),
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user