mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-13 20:18:50 +03:00
fix potential crash when loading channel with no messages
This commit is contained in:
@@ -243,7 +243,10 @@ void ChatList::RefetchMessage(Snowflake id) {
|
||||
}
|
||||
|
||||
Snowflake ChatList::GetOldestListedMessage() {
|
||||
return m_id_to_widget.begin()->first;
|
||||
if (m_id_to_widget.size() > 0)
|
||||
return m_id_to_widget.begin()->first;
|
||||
else
|
||||
return Snowflake::Invalid;
|
||||
}
|
||||
|
||||
void ChatList::UpdateMessageReactions(Snowflake id) {
|
||||
|
||||
Reference in New Issue
Block a user