summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2021-10-12 18:41:10 +0000
committerGitHub <noreply@github.com>2021-10-12 18:41:10 +0000
commit3e34f785c6762fa4320c9c131ff771bdb2a3f74e (patch)
treec54a5050854f62941bc6e586162fdf431c5a5150
parent33935268769bb9a1792e23549997cc8e041d5b0d (diff)
parent96948137247b08300d04beef66b45c36d8195a39 (diff)
downloadabaddon-portaudio-3e34f785c6762fa4320c9c131ff771bdb2a3f74e.tar.gz
abaddon-portaudio-3e34f785c6762fa4320c9c131ff771bdb2a3f74e.zip
Merge pull request #39 from Zander671/master
Fix another unchecked optional
-rw-r--r--discord/discord.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/discord/discord.cpp b/discord/discord.cpp
index 257df5c..c494145 100644
--- a/discord/discord.cpp
+++ b/discord/discord.cpp
@@ -173,7 +173,8 @@ void DiscordClient::FetchMessagesInChannelBefore(Snowflake channel_id, Snowflake
m_store.BeginTransaction();
for (auto &msg : msgs) {
StoreMessageData(msg);
- AddUserToGuild(msg.Author.ID, *msg.GuildID);
+ if (msg.GuildID.has_value())
+ AddUserToGuild(msg.Author.ID, *msg.GuildID);
}
m_store.EndTransaction();