[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:22:13 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=d6a141a
The following commit has been merged in the master branch:
commit d6a141af402d15513365998567d04955d1eec9cc
Author: David Edmundson <kde at davidedmundson.co.uk>
Date: Fri Jul 27 11:30:14 2012 +0100
Fix crash in logviewer when opening with supplied args
Now the model is the treeview some rows do not represent a contact and as such this crashed when accessing entityptr
---
logviewer/entity-view.cpp | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/logviewer/entity-view.cpp b/logviewer/entity-view.cpp
index f351a6e..69c408f 100644
--- a/logviewer/entity-view.cpp
+++ b/logviewer/entity-view.cpp
@@ -47,10 +47,14 @@ void EntityView::rowsInserted(const QModelIndex &parent, int start, int end)
for (int i = start; i <= end; i++) {
QModelIndex index = model()->index(i, 0, parent);
- QString accountId = index.data(EntityModel::AccountRole).value<Tp::AccountPtr>()->uniqueIdentifier();
- QString contactId = index.data(EntityModel::EntityRole).value<Tpl::EntityPtr>()->identifier();
+ Tp::AccountPtr account = index.data(EntityModel::AccountRole).value<Tp::AccountPtr>();
+ Tpl::EntityPtr contact = index.data(EntityModel::EntityRole).value<Tpl::EntityPtr>();
- if (selectAccountId == accountId && selectContactId == contactId) {
+ if (account.isNull() || contact.isNull()) {
+ continue;
+ }
+
+ if (selectAccountId == account->uniqueIdentifier() && selectContactId == contact->identifier()) {
setCurrentIndex(index);
loadedCurrentContact = true;
}
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list