aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/abstractprocessstep.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2018-06-19 11:04:47 +0200
committerEike Ziller <eike.ziller@qt.io>2018-06-19 09:19:07 +0000
commitb6dfab804b7715eec92022805b7f5ced74400ff6 (patch)
treef904c29e8826954925a94b3b2b33b6bffceb9efa /src/plugins/projectexplorer/abstractprocessstep.cpp
parent8623a93998a3f1b37c4fcaa10c282cb71eb4f0a3 (diff)
Fix crash of process steps in deploy configuration
If the step is in a deploy configuration, it doesn't have a direct parent build configuration, so we need to get that from the active target. This is generally improved for BuildStep in master, but here we still have to do that by hand. Fix-up of 75afda1798ebea05be9be8c4c415dd910a8966c9 Task-number: QTCREATORBUG-20631 Change-Id: I22fa16d424ee5928c920663e9d01c791b964e873 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/abstractprocessstep.cpp')
-rw-r--r--src/plugins/projectexplorer/abstractprocessstep.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/abstractprocessstep.cpp b/src/plugins/projectexplorer/abstractprocessstep.cpp
index baa79648c1..1e7f33bf65 100644
--- a/src/plugins/projectexplorer/abstractprocessstep.cpp
+++ b/src/plugins/projectexplorer/abstractprocessstep.cpp
@@ -28,6 +28,7 @@
#include "buildconfiguration.h"
#include "buildstep.h"
#include "project.h"
+#include "target.h"
#include "task.h"
#include <coreplugin/reaper.h>
@@ -306,7 +307,10 @@ void AbstractProcessStep::processReadyReadStdOutput()
if (!m_process)
return;
m_process->setReadChannel(QProcess::StandardOutput);
- const bool utf8Output = buildConfiguration()->environment().hasKey("VSLANG");
+ BuildConfiguration *bc = buildConfiguration();
+ if (!bc)
+ bc = target()->activeBuildConfiguration();
+ const bool utf8Output = bc && bc->environment().hasKey("VSLANG");
while (m_process->canReadLine()) {
QString line = utf8Output ? QString::fromUtf8(m_process->readLine())