summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2023-02-06 03:02:05 -0500
committerouwou <26526779+ouwou@users.noreply.github.com>2023-02-06 03:02:05 -0500
commit41a616edb49b144d4b692e8c33933466e860778b (patch)
tree6d454eeba4c99131fb6c61509e7e367428bfbcbb /src
parent156bd2b720516cc17b82afa2e2583a8c519e836f (diff)
downloadabaddon-portaudio-41a616edb49b144d4b692e8c33933466e860778b.tar.gz
abaddon-portaudio-41a616edb49b144d4b692e8c33933466e860778b.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/components/channels.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/channels.cpp b/src/components/channels.cpp
index 934326d..231d9e3 100644
--- a/src/components/channels.cpp
+++ b/src/components/channels.cpp
@@ -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();