[SCM] ktp-kded-integration-module packaging branch, master, updated. debian/15.12.1-2-382-gbd961c2
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:13:53 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-kded-module.git;a=commitdiff;h=b12961c
The following commit has been merged in the master branch:
commit b12961cb4422a63e51974b1358dc8dbd0df02bbc
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date: Sun Jan 22 11:58:46 2012 +0100
Check for contact manager being null and don't crash if it is.
I had a contact request, killed mc, accepted it and the whole kded didn't crash and the contact was still added. Double win.
Reviewed-by: David Edmundson
BUG: 291305
---
contact-request-handler.cpp | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/contact-request-handler.cpp b/contact-request-handler.cpp
index 13c9924..ac720e3 100644
--- a/contact-request-handler.cpp
+++ b/contact-request-handler.cpp
@@ -239,10 +239,12 @@ void ContactRequestHandler::onContactRequestApproved()
QList<Tp::PendingOperation*> operations;
QHash<QString, Tp::ContactPtr>::const_iterator i = m_pendingContacts.find(contactId);
while (i != m_pendingContacts.constEnd() && i.key() == contactId) {
- Tp::PendingOperation *op = i.value()->manager()->authorizePresencePublication(QList< Tp::ContactPtr >() << i.value());
- op->setProperty("__contact", QVariant::fromValue(i.value()));
- operations.append(op);
- ++i;
+ if (!i.value()->manager().isNull()) {
+ Tp::PendingOperation *op = i.value()->manager()->authorizePresencePublication(QList< Tp::ContactPtr >() << i.value());
+ op->setProperty("__contact", QVariant::fromValue(i.value()));
+ operations.append(op);
+ ++i;
+ }
}
// Take the first value, if any
@@ -303,10 +305,12 @@ void ContactRequestHandler::onContactRequestDenied()
QList<Tp::PendingOperation*> operations;
QHash<QString, Tp::ContactPtr>::const_iterator i = m_pendingContacts.find(contactId);
while (i != m_pendingContacts.constEnd() && i.key() == contactId) {
- Tp::PendingOperation *op = i.value()->manager()->removePresencePublication(QList< Tp::ContactPtr >() << i.value());
- op->setProperty("__contact", QVariant::fromValue(i.value()));
- operations.append(op);
- ++i;
+ if (!i.value()->manager().isNull()) {
+ Tp::PendingOperation *op = i.value()->manager()->removePresencePublication(QList< Tp::ContactPtr >() << i.value());
+ op->setProperty("__contact", QVariant::fromValue(i.value()));
+ operations.append(op);
+ ++i;
+ }
}
// Take the first value, if any
--
ktp-kded-integration-module packaging
More information about the pkg-kde-commits
mailing list