diff --git a/OpenSky.Agent/Views/Models/AircraftTypesViewModel.cs b/OpenSky.Agent/Views/Models/AircraftTypesViewModel.cs index ffa4f07..76c605c 100644 --- a/OpenSky.Agent/Views/Models/AircraftTypesViewModel.cs +++ b/OpenSky.Agent/Views/Models/AircraftTypesViewModel.cs @@ -204,7 +204,7 @@ public class AircraftTypesViewModel : ViewModel /// The override fuel type. /// /// ------------------------------------------------------------------------------------------------- - private FuelType overrideFuelType; + private FuelType overrideFuelType = FuelType.NotUsed; /// ------------------------------------------------------------------------------------------------- /// @@ -1215,7 +1215,7 @@ private void AddAircraftType() IsGearRetractable = this.Simulator.AircraftIdentity.GearRetractable, Name = this.Name, VersionNumber = this.VersionNumber, - ManufacturerID = this.SelectedManufacturer.Id, + ManufacturerID = this.SelectedManufacturer?.Id, Category = this.Category, IsVanilla = this.IsVanilla, IncludeInWorldPopulation = this.IncludeInWorldPopulation, @@ -1321,6 +1321,7 @@ private void CancelAddAircraft() this.MaximumPrice = 0; this.MinimumRunwayLength = 0; this.Comments = null; + this.OverrideFuelType = FuelType.NotUsed; this.aircraftTypeBeingUpdated = null; } diff --git a/changelog.txt b/changelog.txt index 3036b19..25a27cd 100644 --- a/changelog.txt +++ b/changelog.txt @@ -7,6 +7,8 @@ Version 0.5.3 (ALPHA5) -------------------------------------------------------------------------------------- - Improved aircraft type updates, next version and variants updated automatically in improved API method +- Changed default fuel type override to NOT USED +- Fixed crash if no manufacturer was selected -------------------------------------------------------------------------------------- Version 0.5.2 (ALPHA5)