Commit fba39d4a authored by René J.V. Bertin's avatar René J.V. Bertin

Don't call clear() on a shared pointer we don't own

As per the documentation this will delete the pointer itself when the
QSharedPointer refcount drops to 0 That can happen while the target
QProcess instance is still running, and will happen occasionally (on
Mac), causing a crash.
The ChooseCMakeInterfaceJob instance will be deleted soon after a failed
connection attempt so there is no need to clear the server pointer here.

BUG: 403644
parent 09928f62
...@@ -170,7 +170,7 @@ private: ...@@ -170,7 +170,7 @@ private:
Q_ASSERT(code > 0); Q_ASSERT(code > 0);
Q_ASSERT(!server->isServerAvailable()); Q_ASSERT(!server->isServerAvailable());
server.clear(); qCDebug(CMAKE) << "CMake does not provide server mode, using compile_commands.json to import" << project->name();
// parse the JSON file // parse the JSON file
CMakeImportJsonJob* job = new CMakeImportJsonJob(project, this); CMakeImportJsonJob* job = new CMakeImportJsonJob(project, this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment