forked from qt-creator/qt-creator
ClangTools: Avoid accessing deleted run worker
Change-Id: I74b977ede0d153ae4f8d85e03090dfc21facd04b Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -698,6 +698,7 @@ void ClangTool::startTool(ClangTool::FileSelection fileSelection,
|
||||
connect(m_runWorker, &ClangToolRunWorker::started, this, &ClangTool::onStarted);
|
||||
connect(m_runWorker, &ClangToolRunWorker::runnerFinished,
|
||||
this, &ClangTool::updateForCurrentState);
|
||||
connect(m_runControl, &RunControl::destroyed, [this](){ m_runWorker = nullptr; });
|
||||
|
||||
// More init and UI update
|
||||
m_diagnosticFilterModel->setProject(project);
|
||||
@@ -1038,6 +1039,8 @@ void ClangTool::onRunControlStopped()
|
||||
void ClangTool::update()
|
||||
{
|
||||
updateForInitialState();
|
||||
if (!m_runWorker)
|
||||
return;
|
||||
updateForCurrentState();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user