Fix crash while quitting debugging

Task-number: QTCREATORBUG-21684
Change-Id: I2a51d0666f2a591daeec34fc88ee12aa50265ff3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Vikas Pachdha
2019-02-08 17:49:57 +01:00
parent e27744e966
commit 7388326bca

View File

@@ -409,7 +409,7 @@ void ThreadsHandler::setThreads(const GdbMi &data)
if (!m_currentThread && threads.childCount() > 0) if (!m_currentThread && threads.childCount() > 0)
m_currentThread = rootItem()->childAt(0); m_currentThread = rootItem()->childAt(0);
if (!m_currentThread) { if (m_currentThread) {
const QModelIndex currentThreadIndex = m_currentThread->index(); const QModelIndex currentThreadIndex = m_currentThread->index();
threadSwitcher()->setCurrentIndex(currentThreadIndex.row()); threadSwitcher()->setCurrentIndex(currentThreadIndex.row());
} }