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,11 +641,13 @@ void PluginManager::remoteArguments(const QString &serializedArgument, QObject *
|
||||
for (const PluginSpec *ps : plugins()) {
|
||||
if (ps->state() == PluginSpec::Running) {
|
||||
const QStringList pluginOptions = subList(serializedArguments, QLatin1Char(':') + ps->name());
|
||||
QObject *socketParent = ps->plugin()->remoteCommand(pluginOptions, workingDirectory,
|
||||
arguments);
|
||||
if (socketParent && socket) {
|
||||
socket->setParent(socketParent);
|
||||
socket = nullptr;
|
||||
if (IPlugin *plugin = ps->plugin()) {
|
||||
QObject *socketParent
|
||||
= plugin->remoteCommand(pluginOptions, workingDirectory, arguments);
|
||||
if (socketParent && socket) {
|
||||
socket->setParent(socketParent);
|
||||
socket = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user