[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 authored and GitHub committed 2022-09-02 21:49:14 -05:00
1 parent d12145c449
commit 034667f03b
1 file changed
+1 -2
+1 -2
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();
}