forked from qt-creator/qt-creator
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:
@@ -509,11 +509,13 @@ void MemcheckErrorView::suppressError()
|
||||
|
||||
void MemcheckErrorView::goNext()
|
||||
{
|
||||
QTC_ASSERT(rowCount(), return);
|
||||
setCurrentRow((currentRow() + 1) % rowCount());
|
||||
}
|
||||
|
||||
void MemcheckErrorView::goBack()
|
||||
{
|
||||
QTC_ASSERT(rowCount(), return);
|
||||
const int prevRow = currentRow() - 1;
|
||||
setCurrentRow(prevRow >= 0 ? prevRow : rowCount() - 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user