projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ceb1b4a
)
Prevent quasselclient from crashing when using the 'cancel' button of the 'Authorisat...
author
Bruno Bigras
<bigras.bruno@gmail.com>
Tue, 19 Jan 2010 16:58:23 +0000
(11:58 -0500)
committer
Manuel Nickschas
<sputnick@quassel-irc.org>
Mon, 25 Jan 2010 21:35:06 +0000
(22:35 +0100)
src/client/messagemodel.cpp
patch
|
blob
|
history
diff --git
a/src/client/messagemodel.cpp
b/src/client/messagemodel.cpp
index
ba5db09
..
d10a9bc
100644
(file)
--- a/
src/client/messagemodel.cpp
+++ b/
src/client/messagemodel.cpp
@@
-307,10
+307,12
@@
void MessageModel::customEvent(QEvent *event) {
}
void MessageModel::clear() {
- beginRemoveRows(QModelIndex(), 0, rowCount() - 1);
- removeAllMessages();
- endRemoveRows();
_messagesWaiting.clear();
+ if (rowCount() > 0) {
+ beginRemoveRows(QModelIndex(), 0, rowCount() - 1);
+ removeAllMessages();
+ endRemoveRows();
+ }
}
// returns index of msg with given Id or of the next message after that (i.e., the index where we'd insert this msg)