Use default console icon if no skin is available

If the user has no associated skin, app icon will be used.
This commit is contained in:
ORelio 2014-07-02 16:04:34 +02:00
parent 86efb38fa9
commit 6f1fcb22ce

View file

@ -7,6 +7,7 @@ using System.Threading;
using System.Net;
using System.IO;
using System.Drawing;
using System.Windows.Forms;
namespace MinecraftClient
{
@ -41,7 +42,10 @@ namespace MinecraftClient
SetConsoleIcon(skin.GetHicon()); //Set skin as icon
}
}
catch (WebException) { } //Skin not found
catch (WebException) //Skin not found? Reset to default icon
{
SetConsoleIcon(Icon.ExtractAssociatedIcon(Application.ExecutablePath).Handle);
}
}
}
));