Fix 661bdae2: cargo_payment not cleared when aircraft loading cancelled
				
					
				
			This commit is contained in:
		
				
					committed by
					
						
						rubidium42
					
				
			
			
				
	
			
			
			
						parent
						
							fd073a2810
						
					
				
				
					commit
					17d47ba06f
				
			@@ -23,6 +23,7 @@
 | 
				
			|||||||
#include "../company_base.h"
 | 
					#include "../company_base.h"
 | 
				
			||||||
#include "../company_func.h"
 | 
					#include "../company_func.h"
 | 
				
			||||||
#include "../disaster_vehicle.h"
 | 
					#include "../disaster_vehicle.h"
 | 
				
			||||||
 | 
					#include "../economy_base.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "../safeguards.h"
 | 
					#include "../safeguards.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -205,6 +206,7 @@ void UpdateOldAircraft()
 | 
				
			|||||||
			Vehicle *v = *iter;
 | 
								Vehicle *v = *iter;
 | 
				
			||||||
			if (v->type == VEH_AIRCRAFT && !v->current_order.IsType(OT_LOADING)) {
 | 
								if (v->type == VEH_AIRCRAFT && !v->current_order.IsType(OT_LOADING)) {
 | 
				
			||||||
				iter = st->loading_vehicles.erase(iter);
 | 
									iter = st->loading_vehicles.erase(iter);
 | 
				
			||||||
 | 
									delete v->cargo_payment;
 | 
				
			||||||
			} else {
 | 
								} else {
 | 
				
			||||||
				++iter;
 | 
									++iter;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user