mirror of
https://github.com/uowuo/abaddon.git
synced 2026-08-15 05:19:58 +00:00
fix UB when all reactions on a msg are removed and one is added again
This commit is contained in:
@@ -116,8 +116,10 @@ void ChatMessageItemContainer::UpdateContent() {
|
||||
}
|
||||
|
||||
void ChatMessageItemContainer::UpdateReactions() {
|
||||
if (m_reactions_component != nullptr)
|
||||
if (m_reactions_component != nullptr) {
|
||||
delete m_reactions_component;
|
||||
m_reactions_component = nullptr;
|
||||
}
|
||||
|
||||
const auto data = Abaddon::Get().GetDiscordClient().GetMessage(ID);
|
||||
if (data->Reactions.has_value() && data->Reactions->size() > 0) {
|
||||
|
||||
Reference in New Issue
Block a user