[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
+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();
}