mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-01 22:55:41 +08:00
Fix of crash in installer (crashdump)
Since we use the model set component also in the launcher, we need to avoid nullptr calls
This commit is contained in:
@@ -291,9 +291,11 @@ namespace BlackGui
|
|||||||
void CDbOwnModelSetComponent::createNewSet()
|
void CDbOwnModelSetComponent::createNewSet()
|
||||||
{
|
{
|
||||||
// make sure both tabs display the same simulator
|
// make sure both tabs display the same simulator
|
||||||
Q_ASSERT_X(this->getMappingComponent(), Q_FUNC_INFO, "Missing mapping component");
|
// since we use the componet also in the launcher wizard, mc might not be existing
|
||||||
const CSimulatorInfo simulator(this->getModelSetSimulator());
|
const CSimulatorInfo simulator(this->getModelSetSimulator());
|
||||||
this->getMappingComponent()->setOwnModelsSimulator(simulator);
|
CDbMappingComponent *mc = this->getMappingComponent();
|
||||||
|
if (mc) { mc->setOwnModelsSimulator(simulator); }
|
||||||
|
|
||||||
if (!m_modelSetFormDialog)
|
if (!m_modelSetFormDialog)
|
||||||
{
|
{
|
||||||
m_modelSetFormDialog.reset(new CDbOwnModelSetFormDialog(this));
|
m_modelSetFormDialog.reset(new CDbOwnModelSetFormDialog(this));
|
||||||
@@ -313,7 +315,7 @@ namespace BlackGui
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
static const CStatusMessage m = CStatusMessage(this).error("No model data for %1") << simulator.toQString(true);
|
static const CStatusMessage m = CStatusMessage(this).error("No model data for %1") << simulator.toQString(true);
|
||||||
this->getMappingComponent()->showOverlayMessage(m);
|
if (mc) { mc->showOverlayMessage(m); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user