From 14138ca568a8ca43620b0af364e09002ec01c52c Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Mon, 15 Feb 2021 02:17:23 -0500 Subject: [PATCH] handle channel delete for dms --- components/channels.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/channels.cpp b/components/channels.cpp index cd5fee9..70b2a3a 100644 --- a/components/channels.cpp +++ b/components/channels.cpp @@ -327,7 +327,10 @@ void ChannelList::UpdateRemoveGuild(Snowflake id) { void ChannelList::UpdateRemoveChannel(Snowflake id) { auto it = m_id_to_row.find(id); - if (it == m_id_to_row.end()) return; + if (it == m_id_to_row.end()) { + it = m_dm_id_to_row.find(id); + if (it == m_dm_id_to_row.end()) return; + } auto row = dynamic_cast(it->second); if (row == nullptr) return; DeleteRow(row);