projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
7b709c7
)
Prevent quasselclient from crashing when there's no account yet
author
Bruno Bigras
<bigras.bruno@gmail.com>
Tue, 19 Jan 2010 16:45:50 +0000
(11:45 -0500)
committer
Manuel Nickschas
<sputnick@quassel-irc.org>
Mon, 25 Jan 2010 21:35:06 +0000
(22:35 +0100)
src/client/coreaccountmodel.cpp
patch
|
blob
|
history
diff --git
a/src/client/coreaccountmodel.cpp
b/src/client/coreaccountmodel.cpp
index
1ab159c
..
a7a2f01
100644
(file)
--- a/
src/client/coreaccountmodel.cpp
+++ b/
src/client/coreaccountmodel.cpp
@@
-39,11
+39,13
@@
CoreAccountModel::CoreAccountModel(const CoreAccountModel *other, QObject *paren
void CoreAccountModel::update(const CoreAccountModel *other) {
clear();
- beginInsertRows(QModelIndex(), 0, other->_accounts.count() -1);
+ if (other->_accounts.count() > 0) {
+ beginInsertRows(QModelIndex(), 0, other->_accounts.count() -1);
+ _accounts = other->_accounts;
+ endInsertRows();
+ }
_internalAccount = other->internalAccount();
- _accounts = other->_accounts;
_removedAccounts = other->_removedAccounts;
- endInsertRows();
}
void CoreAccountModel::load() {