diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2024-06-25 02:22:22 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2024-06-25 02:22:22 -0400 |
commit | f6c00e6c11d5e2e316cb3aef3b611eda0ce2b683 (patch) | |
tree | 9c1f2f4a175b594f4e1f1605abe79856b7d9094a /src/components/channellist | |
parent | e65174f5aab55fe3917dd52f97b1b00a07d30d38 (diff) | |
parent | 53ad3903ee8e32197dd91d479415ad95f1e6269e (diff) | |
download | abaddon-portaudio-f6c00e6c11d5e2e316cb3aef3b611eda0ce2b683.tar.gz abaddon-portaudio-f6c00e6c11d5e2e316cb3aef3b611eda0ce2b683.zip |
Merge branch 'master' into stages
Diffstat (limited to 'src/components/channellist')
-rw-r--r-- | src/components/channellist/channellisttree.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/channellist/channellisttree.cpp b/src/components/channellist/channellisttree.cpp index 9adee61..e5f31fa 100644 --- a/src/components/channellist/channellisttree.cpp +++ b/src/components/channellist/channellisttree.cpp @@ -1179,8 +1179,11 @@ bool ChannelListTree::SelectionFunc(const Glib::RefPtr<Gtk::TreeModel> &model, c } } - const auto type = (*model->get_iter(path))[m_columns.m_type]; - const auto id = static_cast<Snowflake>((*model->get_iter(path))[m_columns.m_id]); + const auto iter = model->get_iter(path); + if (!iter) return false; + + const auto type = (*iter)[m_columns.m_type]; + const auto id = static_cast<Snowflake>((*iter)[m_columns.m_id]); // todo maybe just keep this last check? if (type == RenderType::TextChannel || type == RenderType::DM || type == RenderType::Thread || (id == m_active_channel)) return true; return is_currently_selected; |