forked from qt-creator/qt-creator
ExtensionSystem: fix crash on git interactive rebase
Luas LuaPluginSpec::plugin() returns a nullptr so we have to check the usages of PluginSpec::plugin before using it. Change-Id: If4fa926814e5a418e446d6970bb46060feec5664 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -641,14 +641,16 @@ void PluginManager::remoteArguments(const QString &serializedArgument, QObject *
|
|||||||
for (const PluginSpec *ps : plugins()) {
|
for (const PluginSpec *ps : plugins()) {
|
||||||
if (ps->state() == PluginSpec::Running) {
|
if (ps->state() == PluginSpec::Running) {
|
||||||
const QStringList pluginOptions = subList(serializedArguments, QLatin1Char(':') + ps->name());
|
const QStringList pluginOptions = subList(serializedArguments, QLatin1Char(':') + ps->name());
|
||||||
QObject *socketParent = ps->plugin()->remoteCommand(pluginOptions, workingDirectory,
|
if (IPlugin *plugin = ps->plugin()) {
|
||||||
arguments);
|
QObject *socketParent
|
||||||
|
= plugin->remoteCommand(pluginOptions, workingDirectory, arguments);
|
||||||
if (socketParent && socket) {
|
if (socketParent && socket) {
|
||||||
socket->setParent(socketParent);
|
socket->setParent(socketParent);
|
||||||
socket = nullptr;
|
socket = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (socket)
|
if (socket)
|
||||||
delete socket;
|
delete socket;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user