[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:28 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=526f2df
The following commit has been merged in the master branch:
commit 526f2dfb42c523eba235ccb5ea3e422abf162094
Author: Dan Vrátil <dan at progdan.cz>
Date: Sat Aug 25 17:07:33 2012 +0200
Fix crash when Tpl::SearchHit has null account
BUG: 305750
REVIEW: 106176
FIXED-IN: 0.5.1
---
logviewer/entity-proxy-model.cpp | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/logviewer/entity-proxy-model.cpp b/logviewer/entity-proxy-model.cpp
index 5365783..67811f6 100644
--- a/logviewer/entity-proxy-model.cpp
+++ b/logviewer/entity-proxy-model.cpp
@@ -48,8 +48,16 @@ bool EntityProxyModel::filterAcceptsRow(int source_row, const QModelIndex &sourc
if (!m_searchHits.isEmpty() && !account.isNull() && !entity.isNull()) {
Q_FOREACH(const Tpl::SearchHit &searchHit, m_searchHits) {
- if ((searchHit.account()->uniqueIdentifier() == account->uniqueIdentifier()) &&
- (searchHit.target()->identifier() == entity->identifier())) {
+ Tp::AccountPtr searchHitAccount = searchHit.account();
+ Tpl::EntityPtr searchHitTarget = searchHit.target();
+
+ /* Don't display search hits with empty account or target */
+ if (searchHitAccount.isNull() || searchHitTarget.isNull()) {
+ continue;
+ }
+
+ if ((searchHitAccount->uniqueIdentifier() == account->uniqueIdentifier()) &&
+ (searchHitTarget->identifier() == entity->identifier())) {
matches_filter = true;
}
}
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list