Commit 0794870d authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Fix use after free in command bar

parent 617480c3
......@@ -55,7 +55,8 @@ protected:
int score = 0;
const auto idx = sourceModel()->index(sourceRow, 0, sourceParent);
const auto actionName = idx.data().toString().splitRef(QLatin1Char(':')).at(1);
const QString string = idx.data().toString();
const QStringView actionName = string.splitRef(QLatin1Char(':')).at(1);
const bool res = kfts::fuzzy_match_sequential(m_pattern, actionName, score);
sourceModel()->setData(idx, score, CommandModel::Score);
return res;
......
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