analyzer: don't crash on "Goto Next Leak" if there is none.

Change-Id: I7829c7c93338fd4238b9148a9fed3be4f5f69687
Reviewed-by: con
Task-number: QTCREATORBUG-5386
Reviewed-on: http://codereview.qt.nokia.com/1427
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
hjk
2011-07-11 14:56:57 +02:00
committed by Eike Ziller
parent bd92b51296
commit 5f65d79605
2 changed files with 4 additions and 2 deletions

View File

@@ -544,8 +544,8 @@ void MemcheckTool::updateErrorFilter()
void MemcheckTool::finished()
{
const int n = m_errorModel->rowCount();
m_goBack->setEnabled(n > 0);
m_goNext->setEnabled(n > 0);
m_goBack->setEnabled(n > 1);
m_goNext->setEnabled(n > 1);
const QString msg = AnalyzerManager::msgToolFinished(displayName(), n);
AnalyzerManager::showStatusMessage(msg);
}