Commit 1c54b848 authored by Vikas Pachdha's avatar Vikas Pachdha

Fix crash when using Valgrind for iOS & Android

Task-number: QTCREATORBUG-18254
Change-Id: I49a20edafa1d241c83a301ce9652a6fb839bed93
Reviewed-by: Eike Ziller's avatarEike Ziller <eike.ziller@qt.io>
Reviewed-by: default avatarhjk <hjk@qt.io>
parent 1e1253b5
......@@ -89,9 +89,13 @@ void ValgrindRunControl::start()
ValgrindRunner *run = runner();
run->setValgrindExecutable(m_settings->valgrindExecutable());
run->setValgrindArguments(genericToolArguments() + toolArguments());
const StandardRunnable r = runnable().as<StandardRunnable>();
run->setDevice(r.device ? r.device : device());
run->setDebuggee(r);
if (runnable().is<StandardRunnable>()) {
const StandardRunnable r = runnable().as<StandardRunnable>();
run->setDevice(r.device ? r.device : device());
run->setDebuggee(r);
} else {
run->setDevice(device());
}
connect(run, &ValgrindRunner::processOutputReceived,
this, &ValgrindRunControl::receiveProcessOutput);
......@@ -116,7 +120,8 @@ RunControl::StopResult ValgrindRunControl::stop()
QString ValgrindRunControl::executable() const
{
return runnable().as<StandardRunnable>().executable;
return runnable().is<StandardRunnable>() ?
runnable().as<StandardRunnable>().executable : QString();
}
QStringList ValgrindRunControl::genericToolArguments() const
......
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