From 09da5b711c5afd4855a33d2af2a79538ed91a235 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Tue, 10 Sep 2019 00:20:04 +0200 Subject: [PATCH] Fix icons with public accessibility. --- ILSpy/Images/Images.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ILSpy/Images/Images.cs b/ILSpy/Images/Images.cs index c919445ff..acac8a34c 100644 --- a/ILSpy/Images/Images.cs +++ b/ILSpy/Images/Images.cs @@ -325,7 +325,10 @@ namespace ICSharpCode.ILSpy protected void PreloadPublicIconToCache(T icon, object image) { var iconKey = (icon, AccessOverlayIcon.Public, false); - cache.Add(iconKey, image); + if (image is ImageSource img) + cache.Add(iconKey, img); + else + cache.Add(iconKey, new DrawingImage((DrawingGroup)image)); } public object GetIcon(T icon, AccessOverlayIcon overlay, bool isStatic)