This commit is contained in:
pvvv 2025-04-11 13:29:23 -05:00 committed by GitHub
commit 9b4488af9f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,5 @@
using System.Drawing; using System.Drawing;
using System.IO;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using System.Windows.Media; using System.Windows.Media;
@ -12,6 +13,7 @@ namespace Bloxstrap.Extensions
{ {
using MemoryStream stream = new(); using MemoryStream stream = new();
icon.Save(stream); icon.Save(stream);
stream.Seek(0, SeekOrigin.Begin);
if (handleException) if (handleException)
{ {
@ -22,7 +24,7 @@ namespace Bloxstrap.Extensions
catch (Exception ex) catch (Exception ex)
{ {
App.Logger.WriteException("IconEx::GetImageSource", ex); App.Logger.WriteException("IconEx::GetImageSource", ex);
Frontend.ShowMessageBox(String.Format(Strings.Dialog_IconLoadFailed, ex.Message)); Frontend.ShowMessageBox(string.Format(Strings.Dialog_IconLoadFailed, ex.Message));
return BootstrapperIcon.IconBloxstrap.GetIcon().GetImageSource(false); return BootstrapperIcon.IconBloxstrap.GetIcon().GetImageSource(false);
} }
} }