[SCM] ktp-common-internals packaging branch, master, updated. debian/16.04.2-1-111-g6e00b1c

Maximiliano Curia maxy at moszumanska.debian.org
Tue Sep 12 14:08:56 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=f053d76

The following commit has been merged in the master branch:
commit f053d76283b1955c4f37bf8fb5ce571af5bb9d27
Author: Martin Klapetek <mklapetek at kde.org>
Date:   Wed Feb 10 22:34:38 2016 -0500

    [declarative] Guard the MessagesModel::data from out-of-bounds indexes
    
    Reviewed-by: Alexandr Akulich <akulichalexander at gmail.com>
---
 KTp/Declarative/messages-model.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/KTp/Declarative/messages-model.cpp b/KTp/Declarative/messages-model.cpp
index f0692d4..179228c 100644
--- a/KTp/Declarative/messages-model.cpp
+++ b/KTp/Declarative/messages-model.cpp
@@ -270,7 +270,7 @@ QVariant MessagesModel::data(const QModelIndex &index, int role) const
 {
     QVariant result;
 
-    if (index.isValid()) {
+    if (index.isValid() && index.row() < rowCount(index.parent())) {
         const MessagePrivate m = d->messages[index.row()];
 
         switch (role) {

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list