From 89afcdace826ee864eaead4b157be0872ce8b444 Mon Sep 17 00:00:00 2001 From: Marcus Eggenberger Date: Thu, 16 Oct 2008 20:39:51 +0200 Subject: [PATCH] fixing client crash on disconnect --- src/qtui/chatscene.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qtui/chatscene.cpp b/src/qtui/chatscene.cpp index 1adea58f..41032f4f 100644 --- a/src/qtui/chatscene.cpp +++ b/src/qtui/chatscene.cpp @@ -266,8 +266,7 @@ void ChatScene::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int e } } - Q_ASSERT(start == 0 || _lines.at(start - 1)->pos().y() + _lines.at(start - 1)->height() == _lines.at(start)->pos().y()); - Q_ASSERT(end + 1 == _lines.count() || _lines.at(end)->pos().y() + _lines.at(end)->height() == _lines.at(end + 1)->pos().y()); + Q_ASSERT(start == 0 || start >= _lines.count() || _lines.at(start - 1)->pos().y() + _lines.at(start - 1)->height() == _lines.at(start)->pos().y()); // update sceneRect // when searching for the first non-date-line we have to take into account that our -- 2.20.1