From 6f1fcb22ce809d6f33a423c981195edf4cdc9f0f Mon Sep 17 00:00:00 2001 From: ORelio Date: Wed, 2 Jul 2014 16:04:34 +0200 Subject: [PATCH] Use default console icon if no skin is available If the user has no associated skin, app icon will be used. --- MinecraftClient/ConsoleIcon.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MinecraftClient/ConsoleIcon.cs b/MinecraftClient/ConsoleIcon.cs index 1a24c129..f1c0e675 100644 --- a/MinecraftClient/ConsoleIcon.cs +++ b/MinecraftClient/ConsoleIcon.cs @@ -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); + } } } ));