Fix crash on RemoteControl launching a Script

List containing bots is modifier while being enumerated: crash
Fixed by copying the list before enumerating
Bug report by Nicconyancat
This commit is contained in:
ORelio 2014-10-08 08:05:45 +02:00
parent ad5897fcb4
commit 050b2985f5

View file

@ -299,7 +299,7 @@ namespace MinecraftClient
public void OnTextReceived(string text)
{
ConsoleIO.WriteLineFormatted(text, false);
foreach (ChatBot bot in bots)
foreach (ChatBot bot in new List<ChatBot>(bots))
bot.GetText(text);
}