mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-28 19:40:54 +00:00
Fixed possible crash on local clearing of filters.
This commit is contained in:
parent
8db8bc466e
commit
6118ced862
@ -538,7 +538,7 @@ void FilterRowButton::paintEvent(QPaintEvent *e) {
|
||||
const auto id = row.filter.id();
|
||||
const auto removed = row.removed;
|
||||
const auto i = ranges::find(list, id, &Data::ChatFilter::id);
|
||||
if (removed && i == end(list)) {
|
||||
if (removed && (i == end(list) || id == FilterId(0))) {
|
||||
continue;
|
||||
} else if (!removed && i != end(list) && *i == row.filter) {
|
||||
order.push_back(id);
|
||||
|
Loading…
Reference in New Issue
Block a user