mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Fix a possible crash in messages list.
This commit is contained in:
@@ -933,7 +933,7 @@ Element *ListWidget::viewByPosition(Data::MessagePosition position) const {
|
||||
const auto result = (index < 0) ? nullptr : _items[index].get();
|
||||
return (position == Data::MinMessagePosition
|
||||
|| position == Data::MaxMessagePosition
|
||||
|| result->data()->position() == position)
|
||||
|| (result && result->data()->position() == position))
|
||||
? result
|
||||
: nullptr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user