diff --git a/src/plugins/debugger/threadshandler.cpp b/src/plugins/debugger/threadshandler.cpp index a37d6fbe1d9..42acf73b872 100644 --- a/src/plugins/debugger/threadshandler.cpp +++ b/src/plugins/debugger/threadshandler.cpp @@ -409,7 +409,7 @@ void ThreadsHandler::setThreads(const GdbMi &data) if (!m_currentThread && threads.childCount() > 0) m_currentThread = rootItem()->childAt(0); - if (!m_currentThread) { + if (m_currentThread) { const QModelIndex currentThreadIndex = m_currentThread->index(); threadSwitcher()->setCurrentIndex(currentThreadIndex.row()); }