Fixed crash in Theme Editor.

There was an attempt to access _searchResults with index from _data.
This commit is contained in:
John Preston 2017-02-09 16:43:21 +03:00
parent 27a4d0f029
commit b84abbec08
1 changed files with 2 additions and 2 deletions

View File

@ -729,8 +729,8 @@ void EditorBlock::addRowRipple(int index) {
auto ripple = row.ripple();
if (!ripple) {
auto mask = Ui::RippleAnimation::rectMask(QSize(width(), row.height()));
ripple = row.setRipple(std_::make_unique<Ui::RippleAnimation>(st::defaultRippleAnimation, std_::move(mask), [this, index] {
updateRow(rowAtIndex(index));
ripple = row.setRipple(std_::make_unique<Ui::RippleAnimation>(st::defaultRippleAnimation, std_::move(mask), [this, index = findRowIndex(&row)] {
updateRow(_data[index]);
}));
}
auto origin = mapFromGlobal(QCursor::pos()) - QPoint(0, row.top());