[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9
Maximiliano Curia
maxy at moszumanska.debian.org
Mon May 9 09:06:27 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=122691e
The following commit has been merged in the master branch:
commit 122691ef61ae14d5149409454faa753e44a79230
Author: David Edmundson <david at davidedmundson.co.uk>
Date: Wed Feb 27 03:28:28 2013 +0000
Don't crash plasma-desktop if someone happens to remove an account for which they have a pinned contact
REVIEW: 109131
---
KTp/Declarative/pinned-contacts-model.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/KTp/Declarative/pinned-contacts-model.cpp b/KTp/Declarative/pinned-contacts-model.cpp
index adff79a..e5febfa 100644
--- a/KTp/Declarative/pinned-contacts-model.cpp
+++ b/KTp/Declarative/pinned-contacts-model.cpp
@@ -68,7 +68,6 @@ static Tp::AccountPtr findAccountByUniqueId(Tp::AccountManagerPtr manager, const
return account;
}
}
- Q_ASSERT(false && "account not found");
return Tp::AccountPtr();
}
@@ -109,7 +108,7 @@ void PinnedContactsModel::setState(const QStringList &pins)
kDebug() << "loading pinned...." << pins;
for (int i = 0; i < pins.count(); i += 2) {
Tp::AccountPtr account = findAccountByUniqueId(d->accountManager, pins[i]);
- if (account->connection()) {
+ if (account && account->connection()) {
Tp::PendingContacts *pending = account->connection()->contactManager()->contactsForIdentifiers(QStringList(pins[i+1]));
pending->setProperty("account", qVariantFromValue<Tp::AccountPtr>(account));
connect(pending, SIGNAL(finished(Tp::PendingOperation*)), SLOT(pinPendingContacts(Tp::PendingOperation*)));
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list