From: Marcus Eggenberger Date: Tue, 30 Sep 2008 22:29:41 +0000 (+0200) Subject: fixing crash on disconnect X-Git-Tag: 0.3.1~212 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=de8ae1e75bbe0b429647db7da758a51323385e57 fixing crash on disconnect --- diff --git a/src/qtui/chatscene.cpp b/src/qtui/chatscene.cpp index a5f624be..7ba9ada9 100644 --- a/src/qtui/chatscene.cpp +++ b/src/qtui/chatscene.cpp @@ -240,6 +240,10 @@ void ChatScene::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int e // update sceneRect // when searching for the first non-date-line we have to take into account that our // model still contains the just removed lines so we cannot simply call updateSceneRect() + if(_lines.isEmpty()) { + updateSceneRect(QRectF(0, 0, _sceneRect.width(), 0)); + return; + } int numRows = model()->rowCount(); QModelIndex firstLineIdx; int row = -1;