[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:05:09 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=4172068
The following commit has been merged in the master branch:
commit 4172068925a04d030701d26f3c7e46d9a6a94aaf
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date: Sat May 12 15:09:40 2012 +0200
Fix null pointer crash
Reviewed-by: David Edmundson
BUG: 299532
---
KTp/Models/contact-model-item.cpp | 30 +++++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/KTp/Models/contact-model-item.cpp b/KTp/Models/contact-model-item.cpp
index a1a44b2..0261550 100644
--- a/KTp/Models/contact-model-item.cpp
+++ b/KTp/Models/contact-model-item.cpp
@@ -195,23 +195,35 @@ Tp::ContactPtr ContactModelItem::contact() const
//return true if both you and the contact can handle audio calls.
bool ContactModelItem::audioCallCapability() const
{
- bool contactCanStreamAudio = mPriv->mContact->capabilities().streamedMediaAudioCalls();
- bool selfCanStreamAudio = mPriv->mContact->manager()->connection()->selfContact()->capabilities().streamedMediaAudioCalls();
- return contactCanStreamAudio && selfCanStreamAudio;
+ if (mPriv->mContact->manager()->connection()) {
+ bool contactCanStreamAudio = mPriv->mContact->capabilities().streamedMediaAudioCalls();
+ bool selfCanStreamAudio = mPriv->mContact->manager()->connection()->selfContact()->capabilities().streamedMediaAudioCalls();
+ return contactCanStreamAudio && selfCanStreamAudio;
+ }
+
+ return false;
}
bool ContactModelItem::videoCallCapability() const
{
- bool contactCanStreamVideo = mPriv->mContact->capabilities().streamedMediaVideoCalls();
- bool selfCanStreamVideo = mPriv->mContact->manager()->connection()->selfContact()->capabilities().streamedMediaVideoCalls();
- return contactCanStreamVideo && selfCanStreamVideo;
+ if (mPriv->mContact->manager()->connection()) {
+ bool contactCanStreamVideo = mPriv->mContact->capabilities().streamedMediaVideoCalls();
+ bool selfCanStreamVideo = mPriv->mContact->manager()->connection()->selfContact()->capabilities().streamedMediaVideoCalls();
+ return contactCanStreamVideo && selfCanStreamVideo;
+ }
+
+ return false;
}
bool ContactModelItem::fileTransferCapability() const
{
- bool contactCanHandleFiles = mPriv->mContact->capabilities().fileTransfers();
- bool selfCanHandleFiles = mPriv->mContact->manager()->connection()->selfContact()->capabilities().fileTransfers();
- return contactCanHandleFiles && selfCanHandleFiles;
+ if (mPriv->mContact->manager()->connection()) {
+ bool contactCanHandleFiles = mPriv->mContact->capabilities().fileTransfers();
+ bool selfCanHandleFiles = mPriv->mContact->manager()->connection()->selfContact()->capabilities().fileTransfers();
+ return contactCanHandleFiles && selfCanHandleFiles;
+ }
+
+ return false;
}
bool ContactModelItem::desktopSharingCapability() const
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list