diff options
author | hjk <hjk@theqtcompany.com> | 2016-07-15 13:48:24 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2016-07-15 12:45:51 +0000 |
commit | 7c48f9c5675e42bc4b5c9eeb382f6f869c25190a (patch) | |
tree | 87981b4a6714fc912b802a26ed988d0fc6ee4aea | |
parent | 2b3d4685dbb08106dba05d3261533fde8a9706d2 (diff) | |
download | qt-creator-7c48f9c5675e42bc4b5c9eeb382f6f869c25190a.tar.gz |
QNX: Prevent crash on failing attach to running process
Change-Id: Ibe8c8e83f81e7111bdd782881eb9f44df71521fe
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
-rw-r--r-- | src/plugins/qnx/qnxattachdebugsupport.cpp | 5 | ||||
-rw-r--r-- | src/plugins/qnx/qnxplugin.cpp | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/qnx/qnxattachdebugsupport.cpp b/src/plugins/qnx/qnxattachdebugsupport.cpp index 87ded8d789..74ec041beb 100644 --- a/src/plugins/qnx/qnxattachdebugsupport.cpp +++ b/src/plugins/qnx/qnxattachdebugsupport.cpp @@ -141,6 +141,11 @@ void QnxAttachDebugSupport::attachToProcess() stopPDebug(); return; } + if (!runControl) { + handleError(tr("Attaching failed.")); + stopPDebug(); + return; + } connect(runControl, &Debugger::DebuggerRunControl::stateChanged, this, &QnxAttachDebugSupport::handleDebuggerStateChanged); ProjectExplorerPlugin::startRunControl(runControl, ProjectExplorer::Constants::DEBUG_RUN_MODE); diff --git a/src/plugins/qnx/qnxplugin.cpp b/src/plugins/qnx/qnxplugin.cpp index cb457b7210..06c58ef173 100644 --- a/src/plugins/qnx/qnxplugin.cpp +++ b/src/plugins/qnx/qnxplugin.cpp @@ -115,6 +115,6 @@ void QnxPlugin::updateDebuggerActions() } } - m_attachToQnxApplication->setVisible(hasValidQnxKit); - m_debugSeparator->setVisible(hasValidQnxKit); + m_attachToQnxApplication->setVisible(false && hasValidQnxKit); // FIXME + m_debugSeparator->setVisible(false && hasValidQnxKit); // FIXME QTCREATORBUG-16608 } |