mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Detect emulated driver before casting to avoid crashs
This commit is contained in:
@@ -854,9 +854,9 @@ namespace BlackCore
|
||||
return false;
|
||||
}
|
||||
|
||||
ISimulator *CContextSimulator::simulator() const
|
||||
QPointer<ISimulator> CContextSimulator::simulator() const
|
||||
{
|
||||
if (!this->isSimulatorAvailable()) { return nullptr; }
|
||||
if (!this->isSimulatorAvailable() || !m_simulatorPlugin.second) { return nullptr; }
|
||||
return m_simulatorPlugin.second;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user