aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2020-05-12 12:32:54 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2020-05-12 10:52:31 +0000
commit56a4865b2f37e810f656f1f79ea416cac5109d49 (patch)
tree81238ea38833731d919333117200384241ee9a3b
parent8e1169f4bf6fc97f7f864cefeb5a273f271798cf (diff)
QbsProjectManager: Fix potential null pointer access
We retrieved the watcher result from the wrong pointer. Fixes: QTCREATORBUG-23924 Change-Id: I876d8adc0aef011deb3f5827f3e50c43a8d92dfc Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r--src/plugins/qbsprojectmanager/qbsproject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/qbsprojectmanager/qbsproject.cpp b/src/plugins/qbsprojectmanager/qbsproject.cpp
index b3264dfb59..96efcd1d6b 100644
--- a/src/plugins/qbsprojectmanager/qbsproject.cpp
+++ b/src/plugins/qbsprojectmanager/qbsproject.cpp
@@ -480,7 +480,7 @@ void QbsBuildSystem::updateProjectNodes(const std::function<void ()> &continuati
m_treeCreationWatcher = new TreeCreationWatcher(this);
connect(m_treeCreationWatcher, &TreeCreationWatcher::finished, this,
[this, watcher = m_treeCreationWatcher, continuation] {
- std::unique_ptr<QbsProjectNode> rootNode(m_treeCreationWatcher->result());
+ std::unique_ptr<QbsProjectNode> rootNode(watcher->result());
if (watcher != m_treeCreationWatcher) {
watcher->deleteLater();
return;