Guard against null squadron in flight creator.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2323
This commit is contained in:
Raffson
2022-07-18 03:21:35 +02:00
committed by GitHub
parent 622e5d65aa
commit a54c217f88

View File

@@ -115,9 +115,7 @@ class QFlightCreator(QDialog):
tooltip="Selects the start type for this flight.",
)
)
squadron: Squadron = self.squadron_selector.currentData()
home_base: ControlPoint = squadron.location
if isinstance(home_base, OffMapSpawn):
if squadron is not None and isinstance(squadron.location, OffMapSpawn):
self.start_type.setCurrentText(StartType.IN_FLIGHT.value)
self.start_type.setEnabled(False)
layout.addWidget(