projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a85b57c
)
fixing BR #302 - client crash on disconnect
author
Marcus Eggenberger
<egs@quassel-irc.org>
Fri, 29 Aug 2008 17:41:14 +0000
(19:41 +0200)
committer
Marcus Eggenberger
<egs@quassel-irc.org>
Fri, 29 Aug 2008 17:41:14 +0000
(19:41 +0200)
src/qtui/chatscene.cpp
patch
|
blob
|
history
diff --git
a/src/qtui/chatscene.cpp
b/src/qtui/chatscene.cpp
index
5f6032c
..
d16e19c
100644
(file)
--- a/
src/qtui/chatscene.cpp
+++ b/
src/qtui/chatscene.cpp
@@
-181,7
+181,9
@@
void ChatScene::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int e
}
setSceneRect(QRectF(0, 0, _width, _height));
emit heightChanged(_height);
- emit heightChangedAt(_lines.at(start)->y(), -h);
+ Q_ASSERT(_lines.isEmpty() || (start < _lines.count())); // if _lines isn't empty it better contain start
+ qreal changePos = (_lines.isEmpty()) ? 0 : _lines.at(start)->y();
+ emit heightChangedAt(changePos, -h);
}
}