fix unchecked optionals

also discard exceptions in file cache futures
This commit is contained in:
ouwou
2021-10-08 17:52:38 -04:00
parent abc0a7931e
commit fa1a007dc1
7 changed files with 40 additions and 23 deletions

View File

@@ -94,7 +94,7 @@ void MemberList::SetActiveChannel(Snowflake id) {
m_guild_id = Snowflake::Invalid;
if (m_chan_id.IsValid()) {
const auto chan = Abaddon::Get().GetDiscordClient().GetChannel(id);
if (chan.has_value()) m_guild_id = *chan->GuildID;
if (chan.has_value() && chan->GuildID.has_value()) m_guild_id = *chan->GuildID;
}
}