QmlDesigner: Fix for crash in puppet creation

Task-number: QDS-4811
Change-Id: Ib1f0b2a76d539e709bea821f4cf950f9b2e94e83
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Aleksei German
2021-08-06 17:33:00 +02:00
parent 7211b7abf2
commit a9f90eea03

View File

@@ -400,10 +400,9 @@ void PuppetCreator::createQml2PuppetExecutableIfMissing()
m_qml2PuppetForKitPuppetHash.insert(m_target->id(), m_availablePuppetType); m_qml2PuppetForKitPuppetHash.insert(m_target->id(), m_availablePuppetType);
} }
} }
} else if (m_target->kit()->isValid()) { } else if (m_target && m_target->kit() && m_target->kit()->isValid()) {
if (pathForBinPuppet(m_target).isExecutableFile()) if (pathForBinPuppet(m_target).isExecutableFile())
m_availablePuppetType = BinPathPuppet; m_availablePuppetType = BinPathPuppet;
} }
} }