diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-05-14 23:43:37 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-05-14 23:43:37 -0400 |
commit | 6a15f91a1482ee93e5809f15fbc48f9747ad68ee (patch) | |
tree | b7a2cb7e6db0cdda2d211e42e5b2b6d08db83f2e /components | |
parent | a283ab14a243e9b5ef96462147f7ca01b0d2c04c (diff) | |
download | abaddon-portaudio-6a15f91a1482ee93e5809f15fbc48f9747ad68ee.tar.gz abaddon-portaudio-6a15f91a1482ee93e5809f15fbc48f9747ad68ee.zip |
set main window to invalid channel when looking at friends
Diffstat (limited to 'components')
-rw-r--r-- | components/ratelimitindicator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/ratelimitindicator.cpp b/components/ratelimitindicator.cpp index 52feed0..d962f98 100644 --- a/components/ratelimitindicator.cpp +++ b/components/ratelimitindicator.cpp @@ -31,9 +31,9 @@ RateLimitIndicator::RateLimitIndicator() void RateLimitIndicator::SetActiveChannel(Snowflake id) { m_active_channel = id; - const auto channel = *Abaddon::Get().GetDiscordClient().GetChannel(m_active_channel); - if (channel.RateLimitPerUser.has_value()) - m_rate_limit = *channel.RateLimitPerUser; + const auto channel = Abaddon::Get().GetDiscordClient().GetChannel(m_active_channel); + if (channel.has_value() && channel->RateLimitPerUser.has_value()) + m_rate_limit = *channel->RateLimitPerUser; else m_rate_limit = 0; |