mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
refs #462 Remove Q_ASSERT for plugin loading failure
This commit is contained in:
@@ -69,7 +69,11 @@ namespace BlackCore
|
|||||||
if (!plugin.listener)
|
if (!plugin.listener)
|
||||||
{
|
{
|
||||||
ISimulatorFactory *factory = getPluginById<ISimulatorFactory>(pluginId);
|
ISimulatorFactory *factory = getPluginById<ISimulatorFactory>(pluginId);
|
||||||
Q_ASSERT(factory);
|
if (!factory)
|
||||||
|
{
|
||||||
|
m_plugins.remove(pluginId);
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
ISimulatorListener *listener = factory->createListener(plugin.info);
|
ISimulatorListener *listener = factory->createListener(plugin.info);
|
||||||
connect(qApp, &QCoreApplication::aboutToQuit, listener, &QObject::deleteLater);
|
connect(qApp, &QCoreApplication::aboutToQuit, listener, &QObject::deleteLater);
|
||||||
|
|||||||
Reference in New Issue
Block a user