[Bug Fix] Avoid erase in discord queue range loop (#2411)

Erasing from the map inside the range loop invalidated the iterator used
internally by the loop. This caused ucs access violations under msvc
debug builds when a discord logging category was enabled.
This commit is contained in:
hg 2022-09-02 22:49:14 -04:00 committed by GitHub
parent d12145c449
commit 034667f03b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,8 +63,7 @@ void DiscordManager::ProcessMessageQueue()
webhook.webhook_url
);
}
webhook_message_queue.erase(q.first);
}
webhook_message_queue.clear();
webhook_queue_lock.unlock();
}