summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/cdb/cdbengine.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2017-10-25 15:53:42 +0300
committerOrgad Shaneh <orgads@gmail.com>2017-10-25 13:27:19 +0000
commit175afabbd7353233d418053980ffb528eee544e9 (patch)
tree6ec27ef98b57444da3a43039449b7c64952fe3f9 /src/plugins/debugger/cdb/cdbengine.cpp
parentc0bffe1db597aa6145876bb3aae0f696cb6e8e43 (diff)
downloadqt-creator-175afabbd7353233d418053980ffb528eee544e9.tar.gz
Cdb: Do not crash if no device is set
It still fails with a soft assertion, but at least doesn't crash. Task-number: QTCREATORBUG-19160 Change-Id: I3779f64e752abf9d3779219552a4a1be648f1dea Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/debugger/cdb/cdbengine.cpp')
-rw-r--r--src/plugins/debugger/cdb/cdbengine.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp
index dd64cab848..38d5a759f3 100644
--- a/src/plugins/debugger/cdb/cdbengine.cpp
+++ b/src/plugins/debugger/cdb/cdbengine.cpp
@@ -880,7 +880,10 @@ void CdbEngine::doInterruptInferior(SpecialStopMode sm)
showMessage(QString("Interrupting process %1...").arg(inferiorPid()), LogMisc);
QTC_ASSERT(!m_signalOperation, notifyInferiorStopFailed(); return;);
- m_signalOperation = runTool()->device()->signalOperation();
+ if (DebuggerRunTool *rt = runTool()) {
+ if (IDevice::ConstPtr device = rt->device())
+ m_signalOperation = device->signalOperation();
+ }
m_specialStopMode = sm;
QTC_ASSERT(m_signalOperation, notifyInferiorStopFailed(); return;);
connect(m_signalOperation.data(), &DeviceProcessSignalOperation::finished,