mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-13 20:18:50 +03:00
fix potential stack overflow
this will only happen if: there is a CHANNEL_UPDATE on a channel the channel is part of a guild which is in a folder and the channel is so old that it shares its id with the guild
This commit is contained in:
@@ -799,7 +799,7 @@ Gtk::TreeModel::iterator ChannelList::GetIteratorForChannelFromID(Snowflake id)
|
||||
|
||||
while (!queue.empty()) {
|
||||
auto item = queue.front();
|
||||
if ((*item)[m_columns.m_id] == id) return item;
|
||||
if ((*item)[m_columns.m_id] == id && (*item)[m_columns.m_type] != RenderType::Guild) return item;
|
||||
for (const auto &child : item->children())
|
||||
queue.push(child);
|
||||
queue.pop();
|
||||
|
||||
Reference in New Issue
Block a user