[SCM] ktp-contact-list packaging branch, master, updated. debian/15.12.1-2-1070-g6c56f91

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:08:41 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=0f8fc44

The following commit has been merged in the master branch:
commit 0f8fc440c2533716bfc51ed1c65615adf191c889
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Thu Jan 19 12:47:32 2012 +0000

    Check index validity in PresenceModel::data()
    
    CCBUG: 291821
---
 presence-model.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/presence-model.cpp b/presence-model.cpp
index c80320d..b2b04ae 100644
--- a/presence-model.cpp
+++ b/presence-model.cpp
@@ -28,6 +28,8 @@
 #include <KDE/KConfig>
 #include <KDE/KConfigGroup>
 #include <KDE/KGlobalSettings>
+#include <KDE/KDebug>
+
 
 PresenceModel::PresenceModel(QObject *parent) :
     QAbstractListModel(parent)
@@ -55,6 +57,11 @@ PresenceModel::~PresenceModel()
 
 QVariant PresenceModel::data(const QModelIndex &index, int role) const
 {
+    if (!index.isValid()) {
+        kDebug() << "invalid index data requested" << index;
+        return QVariant();
+    }
+    
     KTp::Presence presence = m_presences[index.row()];
     switch (role) {
     case Qt::DisplayRole:

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list