Fix crash on disconnect when failed to connect

Fix #67 and bug report by doranchak (post no 1084 on forum thread at
minecraft forums)
This commit is contained in:
ORelio 2015-03-02 21:35:45 +01:00
parent 72c2ff5ef0
commit e4916033fa

View file

@ -283,8 +283,11 @@ namespace MinecraftClient
if (bot is ChatBots.Script)
scripts_on_hold.Add((ChatBots.Script)bot);
if (handler != null)
{
handler.Disconnect();
handler.Dispose();
}
if (cmdprompt != null)
cmdprompt.Abort();