diff --git a/src/Windows/Avalonia.Win32/Win32Platform.cs b/src/Windows/Avalonia.Win32/Win32Platform.cs index 1a12cbc40f5..b7a685a8539 100644 --- a/src/Windows/Avalonia.Win32/Win32Platform.cs +++ b/src/Windows/Avalonia.Win32/Win32Platform.cs @@ -239,7 +239,8 @@ public IWindowIconImpl LoadIcon(IBitmapImpl bitmap) using (var memoryStream = new MemoryStream()) { bitmap.Save(memoryStream); - return CreateIconImpl(memoryStream); + var iconData = memoryStream.ToArray(); + return new IconImpl(new Win32Icon(iconData), iconData); } }