Unverified Commit 5b93bddf authored by Andre Heinecke's avatar Andre Heinecke
Browse files

Fix crash in Keyselectioncombo

When switching the filterRegExp and quickly thereafter
opening the combobox there could be a crash in
From my understanding this was because index.internalPointer
was invalid. As the documentation says that it should
be avoided to use the internal pointer I'm doing that now.

This fixes the crash and I did not see any regressing

Only in master because the filterRegExp switching is
only something that the NewKeyApprovalDialog utilizes.

GnuPG-Bug-Id: T3861
parent fda554b8
......@@ -158,8 +158,8 @@ public:
if (!isCustomItem(index.row())) {
const int row = index.row() - mFrontItems.count();
const QModelIndex idx = createIndex(row, index.column(), index.internalPointer());
return QSortFilterProxyModel::mapToSource(idx);
return sourceModel()->index(row, index.column());
} else {
return QModelIndex();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment